@fses/workbench-app 0.2.17 → 0.2.20
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 +14 -14
- package/dist/WorkbenchCardCenterDrawer-CWBuBD04.js +421 -0
- package/dist/WorkbenchDiagnosticsFooter-BxpwRNMe.js +22 -0
- package/dist/WorkbenchDiagnosticsPage-D0mWFNWS.js +72 -0
- package/dist/Workspace-DwnUU7_7.js +22678 -0
- package/dist/adapters/defaultAgentTransportAdapter.d.ts +6 -0
- package/dist/adapters/defaultBrowserAdapters.d.ts +22 -0
- package/dist/adapters/defaultPlatformRequestAdapter.d.ts +6 -0
- package/dist/adapters/defaultRealtimeAdapter.d.ts +6 -0
- package/dist/adapters/endpointResolver.d.ts +16 -0
- package/dist/adapters/index.d.ts +7 -1
- package/dist/adapters/servicePorts.d.ts +20 -0
- package/dist/adapters/types.d.ts +27 -1
- package/dist/canvas/api/index.js +1 -1
- package/dist/canvas/bridge/workbenchCanvasBus.d.ts +13 -1
- package/dist/canvas/persistence/canvasSnapshotStorage.d.ts +3 -2
- package/dist/{canvasFacade-B8jYm_aO.js → canvasFacade-ZFqB_i7z.js} +1 -1
- package/dist/{cardFactory-DmEBcCf4.js → cardFactory-D5dyYSC3.js} +197 -161
- package/dist/components/WorkbenchAppHost.vue.d.ts +5 -5
- package/dist/components/WorkbenchApplication.vue.d.ts +2 -2
- package/dist/components/WorkbenchCardCenterDrawer.vue.d.ts +2 -0
- package/dist/components/WorkbenchDiagnosticsFooter.vue.d.ts +2 -0
- package/dist/components/WorkbenchDiagnosticsPage.vue.d.ts +2 -0
- package/dist/components/WorkbenchDrawerOutlet.vue.d.ts +6 -0
- package/dist/components/WorkbenchFeatureOutlet.vue.d.ts +2 -0
- package/dist/components/WorkbenchSlotOutlet.vue.d.ts +5 -0
- package/dist/config/workbenchAppConfig.d.ts +4 -0
- package/dist/customCardCatalog-DcoxF7gK.js +512 -0
- package/dist/extensions/index.d.ts +3 -54
- package/dist/extensions/index.js +7 -5
- package/dist/extensions/manifest.d.ts +27 -0
- package/dist/extensions/normalizeWorkbenchExtensions.d.ts +19 -0
- package/dist/extensions/types.d.ts +62 -0
- package/dist/fses-workbench-app.js +106 -89
- package/dist/index-CytMrt6f.js +1771 -0
- package/dist/index-DkGYPLLJ.js +34 -0
- package/dist/index.d.ts +10 -1
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvas.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvasSettingsMenu.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeImageComposeDrawer.vue.d.ts +19 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeToolbar.vue.d.ts +36 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +5 -4
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasConfigController.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasLayoutController.d.ts +12 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasRefreshController.d.ts +11 -0
- package/dist/internal/personal-workbench/components/workbench/controllers/canvasSelectionController.d.ts +11 -0
- package/dist/internal/personal-workbench/components/workbench/showcase/WorkbenchShowcase.vue.d.ts +4 -4
- package/dist/internal/personal-workbench/controllers/workbenchBuiltinPluginBridge.d.ts +32 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartConfigModel.d.ts +68 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDataSourceController.d.ts +100 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDrilldownController.d.ts +96 -0
- package/dist/internal/personal-workbench/controllers/workbenchChartDrilldownTable.d.ts +34 -0
- package/dist/internal/personal-workbench/controllers/workbenchFdeVersionController.d.ts +107 -0
- package/dist/internal/personal-workbench/controllers/workbenchRecommendationConfigModel.d.ts +82 -0
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +13 -9
- package/dist/internal/personal-workbench/lib/deepAgentQueueState.d.ts +3 -1
- package/dist/internal/personal-workbench/lib/fdeWorkbenchConfigClient.d.ts +6 -5
- package/dist/internal/personal-workbench/lib/runtimeIdentity.d.ts +5 -0
- package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +1 -1
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +22 -5
- package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +61 -47
- package/dist/internal/personal-workbench/lib/workbenchMetricDetailApi.d.ts +2 -1
- package/dist/internal/personal-workbench/lib/workbenchRemoteClient.d.ts +3 -1
- package/dist/internal/personal-workbench/lib/workbenchRequestTransport.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +8 -7
- package/dist/internal/personal-workbench/pages/Workspace.vue.d.ts +2 -2
- package/dist/internal/personal-workbench/stores/domains/actionsRuntime.d.ts +35 -0
- package/dist/internal/personal-workbench/stores/domains/canvasRuntime.d.ts +44 -0
- package/dist/internal/personal-workbench/stores/domains/conversationRuntime.d.ts +29 -0
- package/dist/internal/personal-workbench/stores/domains/dataBindingRuntime.d.ts +27 -0
- package/dist/internal/personal-workbench/stores/domains/fdeRuntime.d.ts +38 -0
- package/dist/internal/personal-workbench/stores/domains/memoryRuntime.d.ts +53 -0
- package/dist/internal/personal-workbench/stores/workbenchRuntime.d.ts +28 -1
- package/dist/kernel/command/createCommandRegistry.d.ts +19 -0
- package/dist/kernel/createWorkbenchHostContext.d.ts +43 -0
- package/dist/kernel/createWorkbenchKernel.d.ts +7 -0
- package/dist/kernel/diagnostics/createWorkbenchDiagnostics.d.ts +35 -0
- package/dist/kernel/event/createEventBus.d.ts +16 -0
- package/dist/kernel/plugin/createPluginManager.d.ts +7 -0
- package/dist/kernel/plugin/registrationScope.d.ts +15 -0
- package/dist/kernel/plugin/types.d.ts +30 -0
- package/dist/kernel/registry/createRegistry.d.ts +42 -0
- package/dist/kernel/registry/resolveSlotContributions.d.ts +14 -0
- package/dist/kernel/types.d.ts +52 -0
- package/dist/kernel/workbenchHostContext.d.ts +14 -0
- package/dist/normalizeWorkbenchExtensions-Ccv3n3fC.js +425 -0
- package/dist/plugin/index.d.ts +7 -0
- package/dist/plugin/index.js +8 -0
- package/dist/plugin/types.d.ts +106 -0
- package/dist/plugins/defaultWorkbenchPlugins.d.ts +11 -0
- package/dist/plugins/workbenchCardCenterPlugin.d.ts +13 -0
- package/dist/plugins/workbenchDiagnosticsPlugin.d.ts +15 -0
- package/dist/plugins/workbenchDrawerCommands.d.ts +16 -0
- package/dist/plugins/workbenchSettingsPlugin.d.ts +19 -0
- package/dist/plugins/workbenchThemePlugin.d.ts +15 -0
- package/dist/routing/createWorkbenchFeatureRoute.d.ts +11 -0
- package/dist/routing/resolveWorkbenchFeatureRoute.d.ts +23 -0
- package/dist/runtime/index.d.ts +6 -1
- package/dist/runtime/index.js +6 -3
- package/dist/runtime/scope/createWorkbenchRuntimeScope.d.ts +10 -0
- package/dist/runtime/store/workbenchRuntimeContext.d.ts +12 -0
- package/dist/runtime/store/workbenchRuntimeFacade.d.ts +3 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/useWorkbenchRuntime-CJLqEtgU.js +24062 -0
- package/dist/version.d.ts +1 -1
- package/node_modules/@fses/ai-chat/dist/components/FsesAiChat.vue.d.ts +9 -1
- package/node_modules/@fses/ai-chat/dist/composables/types.d.ts +9 -0
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +28238 -7473
- package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +17 -17
- package/node_modules/@fses/ai-chat/dist/index.d.ts +1 -1
- package/node_modules/@fses/ai-chat/dist/style.css +1 -1
- package/node_modules/@fses/ai-chat/package.json +3 -3
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +5 -5
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card.js +5 -5
- package/node_modules/@fses/workbench-card/dist/fses-workbench-card.umd.cjs +1 -1
- package/node_modules/@fses/workbench-card/dist/types/block.d.ts +4 -1
- package/node_modules/@fses/workbench-card/package.json +1 -1
- package/node_modules/@fses/workbench-card/src/registry/cardRegistry.ts +4 -4
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.js +1 -1
- package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.ts +1 -1
- package/node_modules/@fses/workbench-card/src/types/block.ts +4 -12
- package/package.json +7 -3
- package/dist/Workspace-r8ayksVF.js +0 -23176
- package/dist/index-DEOR_GPc.js +0 -829
- package/dist/useWorkbenchRuntime-DDD22mdF.js +0 -23831
- package/dist/workbenchCustomComponentRegistry-CWUPjCnJ.js +0 -267
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Workspace 图表明细表格纯模型 - 提供单元格文本和默认列宽算法。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-09-01
|
|
5
|
+
*/
|
|
6
|
+
export interface ChartDrilldownColumn {
|
|
7
|
+
label?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ChartDrilldownColumnWidthOptions {
|
|
12
|
+
maxWidth: number;
|
|
13
|
+
minWidth: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 将明细单元格值转换为可展示文本。
|
|
17
|
+
* @param value - 原始单元格值。
|
|
18
|
+
* @returns 标量字符串、JSON 字符串或空字符串。
|
|
19
|
+
*/
|
|
20
|
+
export declare function chartDrilldownCellText(value: unknown): string;
|
|
21
|
+
/**
|
|
22
|
+
* 估算表格文本宽度。
|
|
23
|
+
* @param text - 待估算文本。
|
|
24
|
+
* @returns 近似像素宽度。
|
|
25
|
+
*/
|
|
26
|
+
export declare function estimateChartDrilldownTextWidth(text: string): number;
|
|
27
|
+
/**
|
|
28
|
+
* 根据当前页可见数据计算明细列默认宽度。
|
|
29
|
+
* @param column - 列元数据。
|
|
30
|
+
* @param rows - 当前页明细行。
|
|
31
|
+
* @param options - 最小和最大宽度。
|
|
32
|
+
* @returns 默认列宽像素值。
|
|
33
|
+
*/
|
|
34
|
+
export declare function chartDrilldownPreferredColumnWidth(column: ChartDrilldownColumn, rows: Array<Record<string, unknown>>, options: ChartDrilldownColumnWidthOptions): number;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { FdeWorkbenchAssetPackage } from '../lib/fdeWorkbenchAssetPackage';
|
|
2
|
+
import type { WorkbenchJsonRequestTransport } from '../lib/workbenchRequestTransport';
|
|
3
|
+
import { type FdeWorkbenchConfigRecord, type FdeWorkbenchContext, type FdeWorkbenchRestoreResult, type FdeWorkbenchVersionRecord } from '../lib/fdeWorkbenchConfigClient';
|
|
4
|
+
export interface WorkbenchFdeVersionRuntimePort {
|
|
5
|
+
applyFdeHostInit(payload: {
|
|
6
|
+
type: 'bt-workbench:fde-init';
|
|
7
|
+
protocolVersion: 1;
|
|
8
|
+
resourceId: string;
|
|
9
|
+
versionId?: string;
|
|
10
|
+
draftPackage: FdeWorkbenchAssetPackage | null;
|
|
11
|
+
user: {
|
|
12
|
+
userId: string;
|
|
13
|
+
roleId: string;
|
|
14
|
+
};
|
|
15
|
+
}): unknown;
|
|
16
|
+
canvasDirty: boolean;
|
|
17
|
+
canvasPendingSync: boolean;
|
|
18
|
+
exportFdeDraftPackage(): Promise<FdeWorkbenchAssetPackage>;
|
|
19
|
+
fdeMode: boolean;
|
|
20
|
+
fdeName: string;
|
|
21
|
+
fdeResourceId: string;
|
|
22
|
+
workspaceId: string;
|
|
23
|
+
}
|
|
24
|
+
export interface WorkbenchFdeVersionServices {
|
|
25
|
+
decodeConfig(configJson?: string | null): FdeWorkbenchAssetPackage | null;
|
|
26
|
+
getConfig(context: FdeWorkbenchContext): Promise<FdeWorkbenchConfigRecord | null>;
|
|
27
|
+
listVersions(context: FdeWorkbenchContext): Promise<FdeWorkbenchVersionRecord[]>;
|
|
28
|
+
restoreVersion(context: FdeWorkbenchContext, versionNo: number | string): Promise<FdeWorkbenchRestoreResult>;
|
|
29
|
+
saveConfig(context: FdeWorkbenchContext, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
30
|
+
saveVersion(context: FdeWorkbenchContext, versionName: string, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
31
|
+
}
|
|
32
|
+
export interface WorkbenchFdeVersionControllerOptions {
|
|
33
|
+
flushCanvasDraft(): Promise<boolean>;
|
|
34
|
+
loadDelayMs?: number;
|
|
35
|
+
notify: {
|
|
36
|
+
error(message: string): void;
|
|
37
|
+
success(message: string): void;
|
|
38
|
+
};
|
|
39
|
+
requestTransport?: WorkbenchJsonRequestTransport;
|
|
40
|
+
runtime: WorkbenchFdeVersionRuntimePort;
|
|
41
|
+
services?: WorkbenchFdeVersionServices;
|
|
42
|
+
}
|
|
43
|
+
export interface WorkbenchFdeVersionOption {
|
|
44
|
+
current: boolean;
|
|
45
|
+
description: string;
|
|
46
|
+
versionName: string;
|
|
47
|
+
versionNo: number | string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 归一化版本列表。
|
|
51
|
+
* @param versions - 服务端版本记录。
|
|
52
|
+
* @param currentVersionNo - 当前版本号。
|
|
53
|
+
* @returns UI 可直接展示的版本选项。
|
|
54
|
+
*/
|
|
55
|
+
export declare function normalizeFdeVersionOptions(versions: FdeWorkbenchVersionRecord[], currentVersionNo: number | string): WorkbenchFdeVersionOption[];
|
|
56
|
+
/**
|
|
57
|
+
* 创建 FDE 配置版本控制器。
|
|
58
|
+
* @param options - 运行时端口、配置服务、通知与画布 flush 回调。
|
|
59
|
+
* @returns reactive 状态和完整版本生命周期操作。
|
|
60
|
+
*/
|
|
61
|
+
export declare function createWorkbenchFdeVersionController(options: WorkbenchFdeVersionControllerOptions): {
|
|
62
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
63
|
+
closeVersionMenu: () => void;
|
|
64
|
+
context: import("vue").Ref<{
|
|
65
|
+
resourceId: string;
|
|
66
|
+
appId: string;
|
|
67
|
+
tenantId: string;
|
|
68
|
+
userId: string;
|
|
69
|
+
egoUserinfo: string;
|
|
70
|
+
resourceName: string;
|
|
71
|
+
}, FdeWorkbenchContext | {
|
|
72
|
+
resourceId: string;
|
|
73
|
+
appId: string;
|
|
74
|
+
tenantId: string;
|
|
75
|
+
userId: string;
|
|
76
|
+
egoUserinfo: string;
|
|
77
|
+
resourceName: string;
|
|
78
|
+
}>;
|
|
79
|
+
currentVersionNo: import("vue").Ref<string | number, string | number>;
|
|
80
|
+
dirty: import("vue").Ref<boolean, boolean>;
|
|
81
|
+
dispose(): void;
|
|
82
|
+
draftChanged: import("vue").ComputedRef<boolean>;
|
|
83
|
+
handleVersionMenuFocusout: (event: FocusEvent) => void;
|
|
84
|
+
handleVersionOutsidePointerDown: (event: PointerEvent) => void;
|
|
85
|
+
load: () => Promise<void>;
|
|
86
|
+
refreshVersions: () => Promise<void>;
|
|
87
|
+
restore: (versionNo: number | string) => Promise<void>;
|
|
88
|
+
save: () => Promise<void>;
|
|
89
|
+
saveAsVersion: () => Promise<void>;
|
|
90
|
+
setContext: (nextContext: FdeWorkbenchContext, setOptions?: {
|
|
91
|
+
scheduleLoad?: boolean;
|
|
92
|
+
}) => void;
|
|
93
|
+
versionLabel: import("vue").ComputedRef<string>;
|
|
94
|
+
versionMenuOpen: import("vue").Ref<boolean, boolean>;
|
|
95
|
+
versionMenuRef: import("vue").Ref<HTMLElement, HTMLElement>;
|
|
96
|
+
versions: import("vue").Ref<{
|
|
97
|
+
current: boolean;
|
|
98
|
+
description: string;
|
|
99
|
+
versionName: string;
|
|
100
|
+
versionNo: number | string;
|
|
101
|
+
}[], WorkbenchFdeVersionOption[] | {
|
|
102
|
+
current: boolean;
|
|
103
|
+
description: string;
|
|
104
|
+
versionName: string;
|
|
105
|
+
versionNo: number | string;
|
|
106
|
+
}[]>;
|
|
107
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { CardRecommendationItem, MaterializedBlock } from '@fses/workbench-app/types';
|
|
2
|
+
/**
|
|
3
|
+
* 读取推荐项字段映射。
|
|
4
|
+
* @param item - 推荐项。
|
|
5
|
+
* @returns 第一份非空字段映射。
|
|
6
|
+
*/
|
|
7
|
+
export declare function configuredRecommendationFieldMapping(item: CardRecommendationItem): Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* 合并推荐项字段标签。
|
|
10
|
+
* @param item - 推荐项。
|
|
11
|
+
* @returns 字段标签映射。
|
|
12
|
+
*/
|
|
13
|
+
export declare function configuredRecommendationFieldLabels(item: CardRecommendationItem): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* 返回第一份非空记录。
|
|
16
|
+
* @param candidates - 候选记录。
|
|
17
|
+
* @returns 第一份非空记录或空对象。
|
|
18
|
+
*/
|
|
19
|
+
export declare function firstNonEmptyRecord(...candidates: Array<Record<string, unknown>>): Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* 合并已有卡片 dataBinding 元数据。
|
|
22
|
+
* @param block - 已有卡片。
|
|
23
|
+
* @returns 合并后的 dataBinding。
|
|
24
|
+
*/
|
|
25
|
+
export declare function existingCardDataBindingRecord(block: MaterializedBlock): Record<string, unknown>;
|
|
26
|
+
/**
|
|
27
|
+
* 读取已有卡片字段映射。
|
|
28
|
+
* @param block - 已有卡片。
|
|
29
|
+
* @returns 历史兼容字段映射。
|
|
30
|
+
*/
|
|
31
|
+
export declare function existingCardFieldMapping(block: MaterializedBlock): Record<string, unknown>;
|
|
32
|
+
/**
|
|
33
|
+
* 合并已有卡片字段标签。
|
|
34
|
+
* @param block - 已有卡片。
|
|
35
|
+
* @returns 字段标签映射。
|
|
36
|
+
*/
|
|
37
|
+
export declare function existingCardFieldLabels(block: MaterializedBlock): Record<string, unknown>;
|
|
38
|
+
/**
|
|
39
|
+
* 读取列定义字段名。
|
|
40
|
+
* @param column - 列定义或字段字符串。
|
|
41
|
+
* @returns 字段名。
|
|
42
|
+
*/
|
|
43
|
+
export declare function existingCardColumnName(column: unknown): string;
|
|
44
|
+
/**
|
|
45
|
+
* 从列数组读取去重字段名。
|
|
46
|
+
* @param value - 候选列数组。
|
|
47
|
+
* @returns 去重字段名。
|
|
48
|
+
*/
|
|
49
|
+
export declare function existingCardColumnNamesFromArray(value: unknown): string[];
|
|
50
|
+
/**
|
|
51
|
+
* 从字段映射提取字段名。
|
|
52
|
+
* @param mapping - 字段映射。
|
|
53
|
+
* @returns 去重字段名。
|
|
54
|
+
*/
|
|
55
|
+
export declare function existingCardFieldNamesFromMapping(mapping: Record<string, unknown>): string[];
|
|
56
|
+
/**
|
|
57
|
+
* 读取已有卡片行样本。
|
|
58
|
+
* @param block - 已有卡片。
|
|
59
|
+
* @returns 非空行样本。
|
|
60
|
+
*/
|
|
61
|
+
export declare function existingCardRows(block: MaterializedBlock): Array<Record<string, unknown>>;
|
|
62
|
+
/**
|
|
63
|
+
* 读取已有卡片列定义。
|
|
64
|
+
* @param block - 已有卡片。
|
|
65
|
+
* @returns 字段名与展示名。
|
|
66
|
+
*/
|
|
67
|
+
export declare function existingCardColumns(block: MaterializedBlock): Array<{
|
|
68
|
+
name: string;
|
|
69
|
+
label: string;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* 生成已有卡片重绑定问数口径。
|
|
73
|
+
* @param block - 已有卡片。
|
|
74
|
+
* @returns 可复用问数口径。
|
|
75
|
+
*/
|
|
76
|
+
export declare function existingCardRebindBusinessWording(block: MaterializedBlock): string;
|
|
77
|
+
/**
|
|
78
|
+
* 将已有卡片投影为字段配置推荐项。
|
|
79
|
+
* @param block - 已有卡片或空值。
|
|
80
|
+
* @returns 配置推荐项或 null。
|
|
81
|
+
*/
|
|
82
|
+
export declare function existingCardFieldConfigItem(block: MaterializedBlock | null): CardRecommendationItem | null;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { type RuntimeIdentityContext } from './runtimeIdentity';
|
|
2
|
+
import type { WorkbenchAgentTransportAdapter } from '../../../adapters/types';
|
|
2
3
|
export type DeepAgentClientContext = RuntimeIdentityContext;
|
|
4
|
+
type DeepAgentJsonTransport = Pick<WorkbenchAgentTransportAdapter, 'requestJson'>;
|
|
5
|
+
type DeepAgentEventTransport = Pick<WorkbenchAgentTransportAdapter, 'openEventStream'>;
|
|
3
6
|
export interface DeepAgentRunMessagePayload {
|
|
4
7
|
content: string;
|
|
5
8
|
metadata?: Record<string, unknown>;
|
|
@@ -103,7 +106,7 @@ export declare function classifyDeepAgentCreateError(error: unknown): DeepAgentC
|
|
|
103
106
|
* @param payload - 用户输入和 UI 上下文
|
|
104
107
|
* @returns run 视图
|
|
105
108
|
*/
|
|
106
|
-
export declare function createDeepAgentRun(context: DeepAgentClientContext, payload: CreateDeepAgentRunPayload, idempotencyKey: string): Promise<DeepAgentRunView>;
|
|
109
|
+
export declare function createDeepAgentRun(context: DeepAgentClientContext, payload: CreateDeepAgentRunPayload, idempotencyKey: string, transport?: DeepAgentJsonTransport): Promise<DeepAgentRunView>;
|
|
107
110
|
/**
|
|
108
111
|
* 在已有 thread 下创建后续 run。
|
|
109
112
|
* @param context - 运行态身份上下文
|
|
@@ -111,14 +114,14 @@ export declare function createDeepAgentRun(context: DeepAgentClientContext, payl
|
|
|
111
114
|
* @param payload - 用户输入和 UI 上下文
|
|
112
115
|
* @returns run 视图
|
|
113
116
|
*/
|
|
114
|
-
export declare function createDeepAgentThreadRun(context: DeepAgentClientContext, threadId: string, payload: CreateDeepAgentRunPayload, idempotencyKey: string): Promise<DeepAgentRunView>;
|
|
117
|
+
export declare function createDeepAgentThreadRun(context: DeepAgentClientContext, threadId: string, payload: CreateDeepAgentRunPayload, idempotencyKey: string, transport?: DeepAgentJsonTransport): Promise<DeepAgentRunView>;
|
|
115
118
|
/**
|
|
116
119
|
* 查询 thread 当前 active owner 与 FIFO pending 快照。
|
|
117
120
|
* @param context - 运行态身份上下文。
|
|
118
121
|
* @param threadId - DeepAgent thread id。
|
|
119
122
|
* @returns 带单调版本号的队列快照。
|
|
120
123
|
*/
|
|
121
|
-
export declare function getDeepAgentThreadQueue(context: DeepAgentClientContext, threadId: string): Promise<DeepAgentThreadQueueView>;
|
|
124
|
+
export declare function getDeepAgentThreadQueue(context: DeepAgentClientContext, threadId: string, transport?: DeepAgentJsonTransport): Promise<DeepAgentThreadQueueView>;
|
|
122
125
|
/**
|
|
123
126
|
* 查询 run 视图。
|
|
124
127
|
* @param context - 运行态身份上下文
|
|
@@ -126,7 +129,7 @@ export declare function getDeepAgentThreadQueue(context: DeepAgentClientContext,
|
|
|
126
129
|
* @param runId - DeepAgent run id
|
|
127
130
|
* @returns run 视图
|
|
128
131
|
*/
|
|
129
|
-
export declare function getDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string): Promise<DeepAgentRunView>;
|
|
132
|
+
export declare function getDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, transport?: DeepAgentJsonTransport): Promise<DeepAgentRunView>;
|
|
130
133
|
/**
|
|
131
134
|
* 查询 thread 消息。
|
|
132
135
|
* @param context - 运行态身份上下文
|
|
@@ -134,7 +137,7 @@ export declare function getDeepAgentRun(context: DeepAgentClientContext, threadI
|
|
|
134
137
|
* @param query - 分页参数
|
|
135
138
|
* @returns messages page
|
|
136
139
|
*/
|
|
137
|
-
export declare function listDeepAgentMessages(context: DeepAgentClientContext, threadId: string, query?: ListDeepAgentMessagesQuery): Promise<unknown>;
|
|
140
|
+
export declare function listDeepAgentMessages(context: DeepAgentClientContext, threadId: string, query?: ListDeepAgentMessagesQuery, transport?: DeepAgentJsonTransport): Promise<unknown>;
|
|
138
141
|
/**
|
|
139
142
|
* 提交 run resume 决策。
|
|
140
143
|
* @param context - 运行态身份上下文
|
|
@@ -143,7 +146,7 @@ export declare function listDeepAgentMessages(context: DeepAgentClientContext, t
|
|
|
143
146
|
* @param payload - resume payload
|
|
144
147
|
* @returns resume 结果
|
|
145
148
|
*/
|
|
146
|
-
export declare function resumeDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload: ResumeDeepAgentRunPayload): Promise<DeepAgentRunView>;
|
|
149
|
+
export declare function resumeDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload: ResumeDeepAgentRunPayload, transport?: DeepAgentJsonTransport): Promise<DeepAgentRunView>;
|
|
147
150
|
/**
|
|
148
151
|
* 取消 run。
|
|
149
152
|
* @param context - 运行态身份上下文
|
|
@@ -152,7 +155,7 @@ export declare function resumeDeepAgentRun(context: DeepAgentClientContext, thre
|
|
|
152
155
|
* @param payload - cancel payload
|
|
153
156
|
* @returns cancel 结果
|
|
154
157
|
*/
|
|
155
|
-
export declare function cancelDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: CancelDeepAgentRunPayload): Promise<unknown>;
|
|
158
|
+
export declare function cancelDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: CancelDeepAgentRunPayload, transport?: DeepAgentJsonTransport): Promise<unknown>;
|
|
156
159
|
/**
|
|
157
160
|
* 存档 run。
|
|
158
161
|
* @param context - 运行态身份上下文
|
|
@@ -161,7 +164,7 @@ export declare function cancelDeepAgentRun(context: DeepAgentClientContext, thre
|
|
|
161
164
|
* @param payload - archive payload
|
|
162
165
|
* @returns archive 结果
|
|
163
166
|
*/
|
|
164
|
-
export declare function archiveDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: ArchiveDeepAgentRunPayload): Promise<unknown>;
|
|
167
|
+
export declare function archiveDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: ArchiveDeepAgentRunPayload, transport?: DeepAgentJsonTransport): Promise<unknown>;
|
|
165
168
|
/**
|
|
166
169
|
* 打开 run events SSE。
|
|
167
170
|
* @param context - 运行态身份上下文
|
|
@@ -179,7 +182,7 @@ export declare function openDeepAgentRunEvents(context: DeepAgentClientContext,
|
|
|
179
182
|
signal?: AbortSignal;
|
|
180
183
|
lastEventId?: string;
|
|
181
184
|
eventsUrl?: string;
|
|
182
|
-
}): Promise<void>;
|
|
185
|
+
}, transport?: DeepAgentEventTransport): Promise<void>;
|
|
183
186
|
/**
|
|
184
187
|
* 解析后端返回的 DeepAgent events URL 为 gateway URL。
|
|
185
188
|
* @param threadId - DeepAgent thread id
|
|
@@ -188,3 +191,4 @@ export declare function openDeepAgentRunEvents(context: DeepAgentClientContext,
|
|
|
188
191
|
* @returns gateway 下的 events URL
|
|
189
192
|
*/
|
|
190
193
|
export declare function resolveDeepAgentEventsUrl(threadId: string, runId: string, eventsUrl?: string): string;
|
|
194
|
+
export {};
|
|
@@ -37,6 +37,8 @@ interface RecoverableTurnInput {
|
|
|
37
37
|
clientContext?: unknown;
|
|
38
38
|
}
|
|
39
39
|
export interface VersionedDeepAgentQueueSnapshot {
|
|
40
|
+
active?: unknown;
|
|
41
|
+
pending?: unknown[];
|
|
40
42
|
version?: string;
|
|
41
43
|
}
|
|
42
44
|
export interface DeepAgentQueueSnapshotRun {
|
|
@@ -105,7 +107,7 @@ export declare function recoverableDeepAgentTurnSnapshot(turn: RecoverableTurnIn
|
|
|
105
107
|
* @param incoming - 新到达快照。
|
|
106
108
|
* @returns 版本不倒退的快照。
|
|
107
109
|
*/
|
|
108
|
-
export declare function mergeDeepAgentQueueSnapshot<T extends VersionedDeepAgentQueueSnapshot
|
|
110
|
+
export declare function mergeDeepAgentQueueSnapshot<T extends VersionedDeepAgentQueueSnapshot>(current: T | null, incoming: T): T & {
|
|
109
111
|
version: string;
|
|
110
112
|
};
|
|
111
113
|
/**
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* @created 2026-05-25
|
|
5
5
|
*/
|
|
6
6
|
import type { FdeWorkbenchAssetPackage } from './fdeWorkbenchAssetPackage';
|
|
7
|
+
import { type WorkbenchJsonRequestTransport } from './workbenchRequestTransport';
|
|
7
8
|
export declare const FDE_WORKBENCH_CONTEXT_TYPE = "bt-workbench:fde-context";
|
|
8
9
|
export interface FdeWorkbenchContext {
|
|
9
10
|
resourceId: string;
|
|
@@ -65,14 +66,14 @@ export declare function makeFdeConfigHeaders(context: FdeWorkbenchContext): Reco
|
|
|
65
66
|
* @param context - FDE 上下文
|
|
66
67
|
* @returns 当前配置记录
|
|
67
68
|
*/
|
|
68
|
-
export declare function getFdeWorkbenchConfig(context: FdeWorkbenchContext): Promise<FdeWorkbenchConfigRecord | null>;
|
|
69
|
+
export declare function getFdeWorkbenchConfig(context: FdeWorkbenchContext, transport?: WorkbenchJsonRequestTransport): Promise<FdeWorkbenchConfigRecord | null>;
|
|
69
70
|
/**
|
|
70
71
|
* 保存当前预置模板草稿。
|
|
71
72
|
* @param context - FDE 上下文
|
|
72
73
|
* @param assetPackage - 草稿包对象
|
|
73
74
|
* @returns 接口保存结果
|
|
74
75
|
*/
|
|
75
|
-
export declare function saveFdeWorkbenchConfig(context: FdeWorkbenchContext, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
76
|
+
export declare function saveFdeWorkbenchConfig(context: FdeWorkbenchContext, assetPackage: FdeWorkbenchAssetPackage, transport?: WorkbenchJsonRequestTransport): Promise<unknown>;
|
|
76
77
|
/**
|
|
77
78
|
* 保存当前草稿为新版本。
|
|
78
79
|
* @param context - FDE 上下文
|
|
@@ -80,17 +81,17 @@ export declare function saveFdeWorkbenchConfig(context: FdeWorkbenchContext, ass
|
|
|
80
81
|
* @param assetPackage - 草稿包对象
|
|
81
82
|
* @returns 接口保存结果
|
|
82
83
|
*/
|
|
83
|
-
export declare function saveFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionName: string, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
84
|
+
export declare function saveFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionName: string, assetPackage: FdeWorkbenchAssetPackage, transport?: WorkbenchJsonRequestTransport): Promise<unknown>;
|
|
84
85
|
/**
|
|
85
86
|
* 查询预置模板版本列表。
|
|
86
87
|
* @param context - FDE 上下文
|
|
87
88
|
* @returns 版本列表
|
|
88
89
|
*/
|
|
89
|
-
export declare function listFdeWorkbenchConfigVersions(context: FdeWorkbenchContext): Promise<FdeWorkbenchVersionRecord[]>;
|
|
90
|
+
export declare function listFdeWorkbenchConfigVersions(context: FdeWorkbenchContext, transport?: WorkbenchJsonRequestTransport): Promise<FdeWorkbenchVersionRecord[]>;
|
|
90
91
|
/**
|
|
91
92
|
* 恢复指定预置模板版本。
|
|
92
93
|
* @param context - FDE 上下文
|
|
93
94
|
* @param versionNo - 版本号
|
|
94
95
|
* @returns 接口恢复结果
|
|
95
96
|
*/
|
|
96
|
-
export declare function restoreFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionNo: number | string): Promise<FdeWorkbenchRestoreResult>;
|
|
97
|
+
export declare function restoreFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionNo: number | string, transport?: WorkbenchJsonRequestTransport): Promise<FdeWorkbenchRestoreResult>;
|
|
@@ -28,6 +28,11 @@ export declare function resolveRuntimeTenantId(context: RuntimeIdentityContext):
|
|
|
28
28
|
* @returns 规范化后的应用 ID。
|
|
29
29
|
*/
|
|
30
30
|
export declare function resolveRuntimeAppId(context: RuntimeIdentityContext): string;
|
|
31
|
+
/**
|
|
32
|
+
* 解析当前工作台语言,优先使用 URL 显式语言,再使用浏览器本地持久化语言。
|
|
33
|
+
* @returns 当前工作台 locale。
|
|
34
|
+
*/
|
|
35
|
+
export declare function resolveRuntimeLocale(): string;
|
|
31
36
|
/**
|
|
32
37
|
* 构建 run-agent 运行态身份请求头。
|
|
33
38
|
* @param context - 当前运行态用户上下文。
|
|
@@ -36,7 +36,7 @@ export declare function runtimeCapabilityPrimitiveIds(capability: RuntimeCapabil
|
|
|
36
36
|
icon: string;
|
|
37
37
|
data: import("@fses/workbench-card").RuntimeCapabilityDataSource;
|
|
38
38
|
actions: import("@fses/workbench-card").RuntimeCapabilityActionType[];
|
|
39
|
-
triggers: ("
|
|
39
|
+
triggers: ("onSubmit" | "onSelectResult" | "onClick" | "onChange")[];
|
|
40
40
|
routeTargets: string[];
|
|
41
41
|
};
|
|
42
42
|
export declare function missingRuntimePrimitivesForCapability(capability: RuntimeCapabilityMount): string[];
|
|
@@ -65,7 +65,24 @@ export declare function createTurn(userPrompt: string): ConversationTurn;
|
|
|
65
65
|
* @param conversationId - DeepAgent thread id。
|
|
66
66
|
* @returns 可直接写入运行态 store 的历史 turns。
|
|
67
67
|
*/
|
|
68
|
-
export declare function turnsFromDeepAgentTranscriptMessages(response: unknown, conversationId: string):
|
|
68
|
+
export declare function turnsFromDeepAgentTranscriptMessages(response: unknown, conversationId: string): RestoredConversationTurn[];
|
|
69
|
+
/**
|
|
70
|
+
* DeepAgent transcript 中可恢复到聊天用户消息的附件元数据。
|
|
71
|
+
*/
|
|
72
|
+
export interface RestoredConversationUserAttachment {
|
|
73
|
+
type: 'file' | 'image';
|
|
74
|
+
name: string;
|
|
75
|
+
mimeType: string;
|
|
76
|
+
fileId?: string;
|
|
77
|
+
downloadUrl?: string;
|
|
78
|
+
url?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* 携带 transcript 用户附件的工作台历史轮次。
|
|
82
|
+
*/
|
|
83
|
+
export type RestoredConversationTurn = ConversationTurn & {
|
|
84
|
+
userAttachments?: RestoredConversationUserAttachment[];
|
|
85
|
+
};
|
|
69
86
|
export declare function createConversationId(): string;
|
|
70
87
|
export declare function compactConversationTitle(value: string): string;
|
|
71
88
|
export declare function buildConversationTitle(planResult: PlanResponse, fallback: string): string;
|
|
@@ -245,8 +262,8 @@ export declare function applyNeedsConfirmationEvent(turn: ConversationTurn, even
|
|
|
245
262
|
};
|
|
246
263
|
};
|
|
247
264
|
export declare function applyStatusPulseEvent(turn: ConversationTurn, event: StatusPulseEvent): {
|
|
248
|
-
worklogStageText:
|
|
249
|
-
worklogStageDetail:
|
|
265
|
+
worklogStageText: string;
|
|
266
|
+
worklogStageDetail: string;
|
|
250
267
|
worklogStageVisible: boolean;
|
|
251
268
|
updatedAt: string;
|
|
252
269
|
id: string;
|
|
@@ -294,8 +311,8 @@ export declare function applyStatusPulseEvent(turn: ConversationTurn, event: Sta
|
|
|
294
311
|
export declare function applyActionStreamEvent(turn: ConversationTurn, event: ActionStreamEvent): {
|
|
295
312
|
streamActions: StreamActionItem[];
|
|
296
313
|
returnItems: ConversationReturnItem[];
|
|
297
|
-
worklogStageText:
|
|
298
|
-
worklogStageDetail:
|
|
314
|
+
worklogStageText: string;
|
|
315
|
+
worklogStageDetail: string;
|
|
299
316
|
worklogStageVisible: boolean;
|
|
300
317
|
updatedAt: string;
|
|
301
318
|
id: string;
|