@fses/workbench-app 0.1.0
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/LICENSE +9 -0
- package/dist/Workspace-DP3xr4Jp.js +42979 -0
- package/dist/adapters/defaults.d.ts +15 -0
- package/dist/adapters/index.d.ts +8 -0
- package/dist/adapters/testDoubles.d.ts +12 -0
- package/dist/adapters/types.d.ts +84 -0
- package/dist/canvas/api/types.d.ts +117 -0
- package/dist/canvas/bridge/workbenchCanvasBus.d.ts +7 -0
- package/dist/canvas/layout/logicalLayoutEngine.d.ts +85 -0
- package/dist/canvas/persistence/canvasSnapshotStorage.d.ts +3 -0
- package/dist/card/index.d.ts +8 -0
- package/dist/card/index.js +17 -0
- package/dist/chat/index.d.ts +9 -0
- package/dist/chat/index.js +12 -0
- package/dist/components/WorkbenchAppHost.vue.d.ts +28 -0
- package/dist/components/WorkbenchApplication.vue.d.ts +13 -0
- package/dist/components/WorkbenchShell.vue.d.ts +32 -0
- package/dist/components/WorkbenchWorkspaceCore.vue.d.ts +20 -0
- package/dist/config/workbenchAppConfig.d.ts +43 -0
- package/dist/contracts/index.d.ts +7 -0
- package/dist/contracts/index.js +6 -0
- package/dist/extensions/index.d.ts +59 -0
- package/dist/fde-runtime/runtime/fdeSkillDisplayLabel.d.ts +15 -0
- package/dist/fses-workbench-app.js +91 -0
- package/dist/index-A8Vg4UXL.js +1091 -0
- package/dist/index.d.ts +39 -0
- package/dist/internal/personal-workbench/canvas-runtime/api/canvasFacade.d.ts +2 -0
- package/dist/internal/personal-workbench/canvas-runtime/api/types.d.ts +6 -0
- package/dist/internal/personal-workbench/canvas-runtime/factory/cardFactory.d.ts +25 -0
- package/dist/internal/personal-workbench/canvas-runtime/layout/logicalLayoutEngine.d.ts +6 -0
- package/dist/internal/personal-workbench/canvas-runtime/layout/recommendedCardPlacement.d.ts +54 -0
- package/dist/internal/personal-workbench/canvas-runtime/lifecycle/cardLifecycleService.d.ts +12 -0
- package/dist/internal/personal-workbench/canvas-runtime/primitive/primitivePolicyGate.d.ts +9 -0
- package/dist/internal/personal-workbench/components/runtime/RuntimeCapabilitySlots.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/ChartLinkageConfigModal.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/ConversationTurnCard.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackCanvas.vue.d.ts +91 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackCardShell.vue.d.ts +49 -0
- package/dist/internal/personal-workbench/components/workbench/GridStackContainer.vue.d.ts +39 -0
- package/dist/internal/personal-workbench/components/workbench/LayoutPicker.vue.d.ts +13 -0
- package/dist/internal/personal-workbench/components/workbench/StudioComposer.vue.d.ts +24 -0
- package/dist/internal/personal-workbench/components/workbench/SystemCardPreviewPopover.vue.d.ts +17 -0
- package/dist/internal/personal-workbench/components/workbench/WelcomeBanner.vue.d.ts +19 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchAccessDenied.vue.d.ts +7 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvas.vue.d.ts +290 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvasSettingsMenu.vue.d.ts +40 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchCardConfigDialog.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchDropdownPortal.vue.d.ts +32 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeCardCatalog.vue.d.ts +12 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchListPopover.vue.d.ts +15 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchMetricFilterBindingEditor.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchRecommendationFieldConfigDialog.vue.d.ts +14 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +301 -0
- package/dist/internal/personal-workbench/components/workbench/WorkbenchThemePicker.vue.d.ts +10 -0
- package/dist/internal/personal-workbench/components/workbench/helpers.d.ts +18 -0
- package/dist/internal/personal-workbench/components/workbench/showcase/WorkbenchShowcase.vue.d.ts +273 -0
- package/dist/internal/personal-workbench/composables/useWorkbenchRuntime.d.ts +9 -0
- package/dist/internal/personal-workbench/extensions/cards/customCardCatalog.d.ts +27 -0
- package/dist/internal/personal-workbench/extensions/cards/customComponentRegistry.d.ts +7 -0
- package/dist/internal/personal-workbench/extensions/cards/userCustomCardInsertion.d.ts +21 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedCards.d.ts +2 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedDashboard.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedTemplatePage.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/fde/fdeSkillWorkbenchTheme.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/runtimeExtensions.d.ts +37 -0
- package/dist/internal/personal-workbench/extensions/workbenchAdapters.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/workbenchConfig.d.ts +1 -0
- package/dist/internal/personal-workbench/extensions/workbenchExtensions.d.ts +1 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillCardsHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillChartCard.vue.d.ts +57 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitHeader.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitTitle.vue.d.ts +5 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardGrid.vue.d.ts +57 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHeaderBand.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardKpiItem.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardMarqueeList.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardShell.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardSummaryHeader.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardWidget.vue.d.ts +56 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDrilldownModal.vue.d.ts +20 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillFilterBar.vue.d.ts +18 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillHeaderCard.vue.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillListCard.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillMetricChartToolbar.vue.d.ts +20 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillNumberCard.vue.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillProtocolChartRenderer.vue.d.ts +18 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillQueryCard.vue.d.ts +23 -0
- package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillTemplatePageHost.vue.d.ts +2 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillCardTypes.d.ts +514 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDataRequestMeta.d.ts +13 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDensityFit.d.ts +67 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartOptions.d.ts +14 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartTheme.d.ts +51 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardContext.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardDrilldown.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardKpi.d.ts +36 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardLayout.d.ts +39 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardRefresh.d.ts +24 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardThemes.d.ts +108 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardTypes.d.ts +87 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardViewport.d.ts +71 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDataRefresh.d.ts +59 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDisplayLabel.d.ts +6 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterBarBridge.d.ts +100 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterDefaults.d.ts +21 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterOptions.d.ts +95 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFloatingAction.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillJson.d.ts +11 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillListMarquee.d.ts +32 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricChartDrilldown.d.ts +101 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricNumberDetail.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillNumberFormat.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChart.d.ts +37 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartApi.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDisplayData.d.ts +10 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDrilldown.d.ts +68 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartLinkage.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartRefresh.d.ts +19 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillQueryFilters.d.ts +82 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceDrilldown.d.ts +89 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceFields.d.ts +17 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageMount.d.ts +37 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageTypes.d.ts +59 -0
- package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTimeRangeDefault.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/agentMemoryClient.d.ts +376 -0
- package/dist/internal/personal-workbench/lib/aiChartProtocol.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/aiMetricCardSpec.d.ts +89 -0
- package/dist/internal/personal-workbench/lib/artifactRules.d.ts +15 -0
- package/dist/internal/personal-workbench/lib/assistantPersona.d.ts +28 -0
- package/dist/internal/personal-workbench/lib/assistantPersonaProfiles.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/businessGroupClient.d.ts +25 -0
- package/dist/internal/personal-workbench/lib/canonicalLayoutContext.d.ts +38 -0
- package/dist/internal/personal-workbench/lib/cardContractDemo.d.ts +20 -0
- package/dist/internal/personal-workbench/lib/cardDisplay.d.ts +1 -0
- package/dist/internal/personal-workbench/lib/cardSizeConfig.d.ts +29 -0
- package/dist/internal/personal-workbench/lib/cardStyleConfig.d.ts +128 -0
- package/dist/internal/personal-workbench/lib/conversationScreenContext.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +133 -0
- package/dist/internal/personal-workbench/lib/deepAgentProcessGroups.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentProgressMessage.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentToolDisplayName.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardMutation.d.ts +39 -0
- package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardRecommendation.d.ts +66 -0
- package/dist/internal/personal-workbench/lib/dynamicEchartOption.d.ts +14 -0
- package/dist/internal/personal-workbench/lib/echartsOptionEditorBridge.d.ts +34 -0
- package/dist/internal/personal-workbench/lib/echartsProtocolDataSlimming.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/echartsTemplateAssets.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/echartsTemplateMaterializer.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/fdeWorkbenchAssetPackage.d.ts +107 -0
- package/dist/internal/personal-workbench/lib/fdeWorkbenchConfigClient.d.ts +96 -0
- package/dist/internal/personal-workbench/lib/formatters.d.ts +5 -0
- package/dist/internal/personal-workbench/lib/historyCardBindingRestore.fixture.d.ts +15 -0
- package/dist/internal/personal-workbench/lib/platformFetchClient.d.ts +105 -0
- package/dist/internal/personal-workbench/lib/queryTraceDisplay.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/runtimeCapabilities.d.ts +8 -0
- package/dist/internal/personal-workbench/lib/runtimeIdentity.d.ts +36 -0
- package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +51 -0
- package/dist/internal/personal-workbench/lib/summaryPreview.d.ts +18 -0
- package/dist/internal/personal-workbench/lib/systemCardPreviewProfile.d.ts +23 -0
- package/dist/internal/personal-workbench/lib/userVisibleTextGuard.d.ts +23 -0
- package/dist/internal/personal-workbench/lib/utils.d.ts +46 -0
- package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +450 -0
- package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +686 -0
- package/dist/internal/personal-workbench/lib/workbenchAttachmentUpload.d.ts +47 -0
- package/dist/internal/personal-workbench/lib/workbenchAutoRefreshSession.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/workbenchBusinessGapDiagnostics.d.ts +16 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasBusinessGapChecklist.d.ts +106 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasClassification.d.ts +119 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasDiagnostics.d.ts +100 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasImageCardVisual.d.ts +168 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasImageCompose.d.ts +106 -0
- package/dist/internal/personal-workbench/lib/workbenchCanvasLayoutOverride.d.ts +46 -0
- package/dist/internal/personal-workbench/lib/workbenchCardConfigProfile.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationBinding.d.ts +64 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationFallback.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchCardRecommendationViews.d.ts +24 -0
- package/dist/internal/personal-workbench/lib/workbenchCardUsabilityProfile.d.ts +33 -0
- package/dist/internal/personal-workbench/lib/workbenchChatHistory.d.ts +19 -0
- package/dist/internal/personal-workbench/lib/workbenchChatHistoryReplay.d.ts +25 -0
- package/dist/internal/personal-workbench/lib/workbenchChatMessageOrdering.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchChatPendingTurn.d.ts +21 -0
- package/dist/internal/personal-workbench/lib/workbenchChatReplyBridge.d.ts +55 -0
- package/dist/internal/personal-workbench/lib/workbenchChatStatusCompletion.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchChatTurnSignature.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchConfigDraftReseed.d.ts +18 -0
- package/dist/internal/personal-workbench/lib/workbenchCustomCardCatalog.d.ts +16 -0
- package/dist/internal/personal-workbench/lib/workbenchCustomComponentRegistry.d.ts +4 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingBadge.d.ts +19 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshPolicy.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshTarget.d.ts +47 -0
- package/dist/internal/personal-workbench/lib/workbenchDeleteLayoutCompact.d.ts +41 -0
- package/dist/internal/personal-workbench/lib/workbenchEntryParams.d.ts +50 -0
- package/dist/internal/personal-workbench/lib/workbenchGridstackAdapter.d.ts +231 -0
- package/dist/internal/personal-workbench/lib/workbenchGridstackSaveLayout.d.ts +48 -0
- package/dist/internal/personal-workbench/lib/workbenchImageCanvasSizing.d.ts +45 -0
- package/dist/internal/personal-workbench/lib/workbenchImageComposeEntry.d.ts +53 -0
- package/dist/internal/personal-workbench/lib/workbenchImageGridstackRowRecovery.d.ts +93 -0
- package/dist/internal/personal-workbench/lib/workbenchLayout.d.ts +174 -0
- package/dist/internal/personal-workbench/lib/workbenchManualReplacement.d.ts +87 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricChartDetail.d.ts +75 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricDetailApi.d.ts +62 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricFilterBinding.d.ts +85 -0
- package/dist/internal/personal-workbench/lib/workbenchMetricFilterLinkage.d.ts +30 -0
- package/dist/internal/personal-workbench/lib/workbenchPendingPatch.d.ts +54 -0
- package/dist/internal/personal-workbench/lib/workbenchRemoteClient.d.ts +39 -0
- package/dist/internal/personal-workbench/lib/workbenchShellSplit.d.ts +107 -0
- package/dist/internal/personal-workbench/lib/workbenchShowcase.d.ts +60 -0
- package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +28 -0
- package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +67 -0
- package/dist/internal/personal-workbench/lib/workbenchSystemCardPreviews.d.ts +31 -0
- package/dist/internal/personal-workbench/lib/workbenchSystemCardPrompt.d.ts +36 -0
- package/dist/internal/personal-workbench/lib/workbenchTextIntent.d.ts +11 -0
- package/dist/internal/personal-workbench/lib/workbenchThemes.d.ts +6 -0
- package/dist/internal/personal-workbench/lib/workbenchV2Adapter.d.ts +49 -0
- package/dist/internal/personal-workbench/pages/Workspace.vue.d.ts +7 -0
- package/dist/internal/personal-workbench/stores/workbenchRuntime.d.ts +170 -0
- package/dist/internal/personal-workbench/themes/index.d.ts +6 -0
- package/dist/internal/personal-workbench/themes/workbenchThemeDefinitions.d.ts +78 -0
- package/dist/internal/personal-workbench/types/workbenchV2.d.ts +211 -0
- package/dist/internal/personal-workbench/vue-types/workbenchRuntime.d.ts +191 -0
- package/dist/runtime/context/workbenchAppContext.d.ts +32 -0
- package/dist/runtime/conversation/workbenchChatMessageOrdering.d.ts +50 -0
- package/dist/runtime/conversation/workbenchChatStatusCompletion.d.ts +27 -0
- package/dist/runtime/conversation/workbenchChatTurnSignature.d.ts +11 -0
- package/dist/runtime/data-binding/workbenchDataBindingRefreshPolicy.d.ts +36 -0
- package/dist/runtime/deep-agent/deepAgentProcessGroups.d.ts +84 -0
- package/dist/runtime/deep-agent/deepAgentProgressMessage.d.ts +22 -0
- package/dist/runtime/deep-agent/deepAgentToolDisplayName.d.ts +12 -0
- package/dist/runtime/index.d.ts +8 -0
- package/dist/runtime/index.js +5 -0
- package/dist/runtime/store/workbenchRuntimeFacade.d.ts +16 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/useWorkbenchRuntime-Pekhufen.js +26338 -0
- package/package.json +143 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview ECharts 模板物化 - 将系统模板注册项转换为画布 ECharts protocol 数据。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-22
|
|
5
|
+
*/
|
|
6
|
+
import type { EChartsSystemCardTemplateEntry } from '@fses/workbench-app/types';
|
|
7
|
+
import type { MaterializedBlock, ProtocolRenderData } from '@fses/workbench-app/types';
|
|
8
|
+
export type EChartsTemplateMaterializeResult = {
|
|
9
|
+
ok: true;
|
|
10
|
+
data: ProtocolRenderData & {
|
|
11
|
+
sourceLabel: string;
|
|
12
|
+
template: Record<string, unknown>;
|
|
13
|
+
};
|
|
14
|
+
renderer: MaterializedBlock['renderer'];
|
|
15
|
+
meta: Record<string, unknown>;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
reason: string;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 物化 ECharts 模板运行时数据。
|
|
22
|
+
* @param entry - ECharts 系统模板注册项。
|
|
23
|
+
* @returns 物化结果。
|
|
24
|
+
*/
|
|
25
|
+
export declare function materializeEChartsTemplate(entry: EChartsSystemCardTemplateEntry): Promise<EChartsTemplateMaterializeResult>;
|
|
26
|
+
/**
|
|
27
|
+
* 判断注册项是否为 ECharts 模板。
|
|
28
|
+
* @param value - 候选注册项。
|
|
29
|
+
* @returns 是 ECharts 模板返回 true。
|
|
30
|
+
*/
|
|
31
|
+
export declare function isEChartsTemplateEntry(value: unknown): value is EChartsSystemCardTemplateEntry;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview FDE workbench asset package adapter - converts snapshots to external asset packages.
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-20
|
|
5
|
+
*/
|
|
6
|
+
import type { BlockLayout, LayoutConfig, MaterializedBlock, WorkbenchSnapshot } from '@fses/workbench-app/types';
|
|
7
|
+
export declare const FDE_WORKBENCH_ASSET_SCHEMA_VERSION = "workbench.asset.v1";
|
|
8
|
+
export interface FdeWorkbenchWorkspaceDocument {
|
|
9
|
+
workspaceId: string;
|
|
10
|
+
userId: string;
|
|
11
|
+
roleId: WorkbenchSnapshot['roleId'];
|
|
12
|
+
resourceId?: string;
|
|
13
|
+
path?: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
tag?: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
source?: 'fde_preset' | 'user_saved' | string;
|
|
18
|
+
renameable?: boolean;
|
|
19
|
+
ownerUserId?: string;
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
version: number;
|
|
22
|
+
layoutVersion: number;
|
|
23
|
+
layoutConfig: LayoutConfig;
|
|
24
|
+
cardOrder: string[];
|
|
25
|
+
visualConfig?: WorkbenchSnapshot['visualConfig'];
|
|
26
|
+
globalStyle: Record<string, unknown>;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FdeWorkbenchCardDocument {
|
|
30
|
+
cardId: string;
|
|
31
|
+
workspaceId: string;
|
|
32
|
+
userId: string;
|
|
33
|
+
title: string;
|
|
34
|
+
subtitle?: string;
|
|
35
|
+
layout: BlockLayout;
|
|
36
|
+
renderer: NonNullable<MaterializedBlock['renderer']>;
|
|
37
|
+
state: MaterializedBlock['state'];
|
|
38
|
+
style: Record<string, unknown>;
|
|
39
|
+
commonMeta: Record<string, unknown>;
|
|
40
|
+
bodyJson: Record<string, unknown>;
|
|
41
|
+
version: number;
|
|
42
|
+
updatedAt: string;
|
|
43
|
+
rendererType?: string;
|
|
44
|
+
protocolConfig?: Record<string, unknown>;
|
|
45
|
+
protocolData?: Record<string, unknown>;
|
|
46
|
+
dataBindingId?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FdeWorkbenchQueryPlanDocument {
|
|
49
|
+
bindingId: string;
|
|
50
|
+
workspaceId: string;
|
|
51
|
+
userId: string;
|
|
52
|
+
cardId: string;
|
|
53
|
+
question: string;
|
|
54
|
+
validatedSql: string;
|
|
55
|
+
sqlDialect: string;
|
|
56
|
+
externalSqlApi: string;
|
|
57
|
+
fieldMapping: Record<string, unknown>;
|
|
58
|
+
paramsSchema: Record<string, unknown>;
|
|
59
|
+
permissionContext: {
|
|
60
|
+
tenantId: string;
|
|
61
|
+
appId: string;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
};
|
|
64
|
+
createdBy: 'ai' | 'system' | 'user';
|
|
65
|
+
version: number;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
}
|
|
68
|
+
export interface FdeWorkbenchAssetPackage {
|
|
69
|
+
schemaVersion: typeof FDE_WORKBENCH_ASSET_SCHEMA_VERSION;
|
|
70
|
+
workspace: FdeWorkbenchWorkspaceDocument;
|
|
71
|
+
cards: FdeWorkbenchCardDocument[];
|
|
72
|
+
queryPlans: FdeWorkbenchQueryPlanDocument[];
|
|
73
|
+
layout: BlockLayout[];
|
|
74
|
+
visualConfig: WorkbenchSnapshot['visualConfig'] | Record<string, unknown>;
|
|
75
|
+
}
|
|
76
|
+
export interface FdeWorkbenchAssetPackageMetadata {
|
|
77
|
+
resourceId?: string;
|
|
78
|
+
path?: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
tag?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
source?: FdeWorkbenchWorkspaceDocument['source'];
|
|
83
|
+
renameable?: boolean;
|
|
84
|
+
ownerUserId?: string;
|
|
85
|
+
createdAt?: string;
|
|
86
|
+
updatedAt?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Converts a FDE asset package into a frontend workbench snapshot.
|
|
90
|
+
* @param assetPackage - External FDE asset package.
|
|
91
|
+
* @returns Workbench snapshot used by the canvas runtime.
|
|
92
|
+
*/
|
|
93
|
+
export declare function snapshotFromFdeAssetPackage(assetPackage: FdeWorkbenchAssetPackage): WorkbenchSnapshot;
|
|
94
|
+
/**
|
|
95
|
+
* Converts a frontend snapshot into a persistable FDE asset package.
|
|
96
|
+
* @param snapshot - Current canvas snapshot.
|
|
97
|
+
* @param previousPackage - Previously loaded package, used to preserve metadata and query plans.
|
|
98
|
+
* @param metadata - External scope metadata supplied by the FDE host.
|
|
99
|
+
* @returns Asset package suitable for saving through the external API.
|
|
100
|
+
*/
|
|
101
|
+
export declare function snapshotToFdeAssetPackage(snapshot: WorkbenchSnapshot, previousPackage?: FdeWorkbenchAssetPackage | null, metadata?: FdeWorkbenchAssetPackageMetadata): FdeWorkbenchAssetPackage;
|
|
102
|
+
/**
|
|
103
|
+
* Collects all active data binding ids referenced by snapshot blocks.
|
|
104
|
+
* @param snapshot - Snapshot to inspect.
|
|
105
|
+
* @returns Set of non-empty binding ids.
|
|
106
|
+
*/
|
|
107
|
+
export declare function collectSnapshotDataBindingIds(snapshot: WorkbenchSnapshot): Set<string>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview FDE 个人工作台配置客户端 - 负责预置模板草稿包接口、上下文和 config_json 编解码
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-25
|
|
5
|
+
*/
|
|
6
|
+
import type { FdeWorkbenchAssetPackage } from './fdeWorkbenchAssetPackage';
|
|
7
|
+
export declare const FDE_WORKBENCH_CONTEXT_TYPE = "bt-workbench:fde-context";
|
|
8
|
+
export interface FdeWorkbenchContext {
|
|
9
|
+
resourceId: string;
|
|
10
|
+
appId: string;
|
|
11
|
+
tenantId: string;
|
|
12
|
+
userId: string;
|
|
13
|
+
egoUserinfo: string;
|
|
14
|
+
resourceName: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FdeWorkbenchConfigRecord {
|
|
17
|
+
app_id?: string;
|
|
18
|
+
resource_id?: string;
|
|
19
|
+
current_version_no?: number | string;
|
|
20
|
+
published_version_no?: number | string;
|
|
21
|
+
config_json?: string;
|
|
22
|
+
config_hash?: string;
|
|
23
|
+
published_config_hash?: string;
|
|
24
|
+
dirty?: boolean;
|
|
25
|
+
publish_time?: string;
|
|
26
|
+
update_time?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface FdeWorkbenchVersionRecord {
|
|
29
|
+
version_no?: number | string;
|
|
30
|
+
version_name?: string;
|
|
31
|
+
description?: string;
|
|
32
|
+
remark?: string;
|
|
33
|
+
current?: boolean;
|
|
34
|
+
is_current?: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface FdeWorkbenchRestoreResult extends FdeWorkbenchConfigRecord {
|
|
37
|
+
version_no?: number | string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* 将草稿包对象或 JSON 字符串编码为接口要求的 base64 字符串。
|
|
41
|
+
* @param config - 草稿包对象或 JSON 字符串
|
|
42
|
+
* @returns UTF-8 安全的 base64 字符串
|
|
43
|
+
*/
|
|
44
|
+
export declare function encodeConfigJson(config: unknown): string;
|
|
45
|
+
/**
|
|
46
|
+
* 解码接口返回的 config_json。
|
|
47
|
+
* @param configJson - base64 配置字符串
|
|
48
|
+
* @returns 草稿包对象,空值返回 null
|
|
49
|
+
*/
|
|
50
|
+
export declare function decodeConfigJson(configJson?: string | null): FdeWorkbenchAssetPackage | null;
|
|
51
|
+
/**
|
|
52
|
+
* 规范化宿主通过 postMessage 传入的 FDE 上下文。
|
|
53
|
+
* @param value - 原始 message 数据
|
|
54
|
+
* @returns 可用于接口调用的上下文,非 context 消息返回 null
|
|
55
|
+
*/
|
|
56
|
+
export declare function normalizeFdeContextMessage(value: unknown): FdeWorkbenchContext | null;
|
|
57
|
+
/**
|
|
58
|
+
* 生成 FDE 配置接口统一 header。
|
|
59
|
+
* @param context - FDE 上下文
|
|
60
|
+
* @returns 只包含非空字段的 header map
|
|
61
|
+
*/
|
|
62
|
+
export declare function makeFdeConfigHeaders(context: FdeWorkbenchContext): Record<string, string>;
|
|
63
|
+
/**
|
|
64
|
+
* 查询当前预置模板配置。
|
|
65
|
+
* @param context - FDE 上下文
|
|
66
|
+
* @returns 当前配置记录
|
|
67
|
+
*/
|
|
68
|
+
export declare function getFdeWorkbenchConfig(context: FdeWorkbenchContext): Promise<FdeWorkbenchConfigRecord | null>;
|
|
69
|
+
/**
|
|
70
|
+
* 保存当前预置模板草稿。
|
|
71
|
+
* @param context - FDE 上下文
|
|
72
|
+
* @param assetPackage - 草稿包对象
|
|
73
|
+
* @returns 接口保存结果
|
|
74
|
+
*/
|
|
75
|
+
export declare function saveFdeWorkbenchConfig(context: FdeWorkbenchContext, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
76
|
+
/**
|
|
77
|
+
* 保存当前草稿为新版本。
|
|
78
|
+
* @param context - FDE 上下文
|
|
79
|
+
* @param versionName - 新版本名称
|
|
80
|
+
* @param assetPackage - 草稿包对象
|
|
81
|
+
* @returns 接口保存结果
|
|
82
|
+
*/
|
|
83
|
+
export declare function saveFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionName: string, assetPackage: FdeWorkbenchAssetPackage): Promise<unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* 查询预置模板版本列表。
|
|
86
|
+
* @param context - FDE 上下文
|
|
87
|
+
* @returns 版本列表
|
|
88
|
+
*/
|
|
89
|
+
export declare function listFdeWorkbenchConfigVersions(context: FdeWorkbenchContext): Promise<FdeWorkbenchVersionRecord[]>;
|
|
90
|
+
/**
|
|
91
|
+
* 恢复指定预置模板版本。
|
|
92
|
+
* @param context - FDE 上下文
|
|
93
|
+
* @param versionNo - 版本号
|
|
94
|
+
* @returns 接口恢复结果
|
|
95
|
+
*/
|
|
96
|
+
export declare function restoreFdeWorkbenchConfigVersion(context: FdeWorkbenchContext, versionNo: number | string): Promise<FdeWorkbenchRestoreResult>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function formatNumber(value: number, options?: Intl.NumberFormatOptions, fallback?: string): string;
|
|
2
|
+
export declare function formatDate(date: Date | string, options?: Intl.DateTimeFormatOptions, fallback?: string): string;
|
|
3
|
+
export declare function formatDateTime(value?: string, options?: Intl.DateTimeFormatOptions): string;
|
|
4
|
+
export declare function formatMetricValue(value: number, format?: string): string;
|
|
5
|
+
export declare function formatAmount(value: number, options?: Intl.NumberFormatOptions): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 历史推荐绑定恢复测试 fixture - 保存受影响 transcript 的脱敏真实结构
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-08-03
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 构造真实缺少任何允许位置绑定的旧历史 transcript。
|
|
8
|
+
* @returns 无绑定旧历史 transcript items。
|
|
9
|
+
*/
|
|
10
|
+
export declare function buildAffectedUnboundHistoryTranscriptItems(): Array<Record<string, unknown>>;
|
|
11
|
+
/**
|
|
12
|
+
* 构造真实携带对象绑定位置的同类历史 transcript。
|
|
13
|
+
* @returns 带绑定历史 transcript items。
|
|
14
|
+
*/
|
|
15
|
+
export declare function buildBoundHistoryTranscriptItems(): Array<Record<string, unknown>>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 平台 getFetch 请求适配层 - 统一非流式后端接口的安全签名请求。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-07-07
|
|
5
|
+
*/
|
|
6
|
+
import type { FetchConfig, FetchService, Method } from '@byteluck-fe/global-shared';
|
|
7
|
+
export interface PlatformRequestConfig {
|
|
8
|
+
method?: Method | string;
|
|
9
|
+
url: string;
|
|
10
|
+
params?: Record<string, unknown>;
|
|
11
|
+
payload?: unknown;
|
|
12
|
+
headers?: Record<string, string>;
|
|
13
|
+
responseType?: FetchConfig['responseType'];
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}
|
|
16
|
+
export interface PlatformUploadFileConfig {
|
|
17
|
+
url: string;
|
|
18
|
+
file: File | Blob;
|
|
19
|
+
name?: string;
|
|
20
|
+
filename?: string;
|
|
21
|
+
data?: Record<string, unknown>;
|
|
22
|
+
headers?: Record<string, string>;
|
|
23
|
+
}
|
|
24
|
+
export interface PlatformEnvelope<T> {
|
|
25
|
+
code?: string | number;
|
|
26
|
+
state?: string;
|
|
27
|
+
message?: string;
|
|
28
|
+
data?: T;
|
|
29
|
+
}
|
|
30
|
+
type PlatformHeaderSource = HeadersInit | Record<string, string | number | boolean | null | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* 动态服务返回非 JSON 内容时的可识别错误。
|
|
33
|
+
*/
|
|
34
|
+
export declare class NonJsonDynamicResponseError extends Error {
|
|
35
|
+
/**
|
|
36
|
+
* 标记动态服务返回了非 JSON 响应。
|
|
37
|
+
*/
|
|
38
|
+
constructor();
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 注入测试用 getFetch client。
|
|
42
|
+
* @param client - 测试 client。
|
|
43
|
+
* @returns void
|
|
44
|
+
*/
|
|
45
|
+
export declare function __setPlatformFetchClientForTest(client: FetchService): void;
|
|
46
|
+
/**
|
|
47
|
+
* 清理测试注入 client。
|
|
48
|
+
* @returns void
|
|
49
|
+
*/
|
|
50
|
+
export declare function __resetPlatformFetchClientForTest(): void;
|
|
51
|
+
/**
|
|
52
|
+
* 应用入口显式初始化平台用户 session,写入 sessionStorage.userInfoData(含 ut)。
|
|
53
|
+
* 应在首个私有接口前调用,便于女娲沙箱等隔离环境下尽早暴露引导失败。
|
|
54
|
+
* @returns 是否已具备可用于 post-auth 的 ut。
|
|
55
|
+
*/
|
|
56
|
+
export declare function ensurePlatformUserSessionReady(): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* 将 RequestInit headers 归一化为 getFetch 支持的普通对象。
|
|
59
|
+
* @param sources - 待合并的 headers。
|
|
60
|
+
* @returns 普通 header map。
|
|
61
|
+
*/
|
|
62
|
+
export declare function createPlatformHeaders(...sources: Array<PlatformHeaderSource | null | undefined>): Record<string, string>;
|
|
63
|
+
/**
|
|
64
|
+
* 将 RequestInit signal 归一化为 getFetch 配置可接受的值。
|
|
65
|
+
* @param signal - fetch signal。
|
|
66
|
+
* @returns 非空 AbortSignal。
|
|
67
|
+
*/
|
|
68
|
+
export declare function normalizePlatformSignal(signal: AbortSignal | null | undefined): AbortSignal | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* 发起原始 payload 请求。
|
|
71
|
+
* @param config - 请求配置。
|
|
72
|
+
* @returns 原始响应 payload。
|
|
73
|
+
*/
|
|
74
|
+
export declare function requestRawPayload<T = unknown>(config: PlatformRequestConfig): Promise<T>;
|
|
75
|
+
/**
|
|
76
|
+
* 请求 run-agent 风格接口并解包 data。
|
|
77
|
+
* @param config - 请求配置。
|
|
78
|
+
* @returns data 字段。
|
|
79
|
+
*/
|
|
80
|
+
export declare function requestRunAgentJson<T>(config: PlatformRequestConfig): Promise<T>;
|
|
81
|
+
/**
|
|
82
|
+
* 请求平台接口并保留 envelope。
|
|
83
|
+
* @param config - 请求配置。
|
|
84
|
+
* @returns 平台 envelope。
|
|
85
|
+
*/
|
|
86
|
+
export declare function requestPlatformEnvelope<T>(config: PlatformRequestConfig): Promise<PlatformEnvelope<T>>;
|
|
87
|
+
/**
|
|
88
|
+
* 使用 getFetch uploadFile 上传文件。
|
|
89
|
+
* @param config - 上传配置。
|
|
90
|
+
* @returns 上传响应 payload。
|
|
91
|
+
*/
|
|
92
|
+
export declare function uploadPlatformFile<T = unknown>(config: PlatformUploadFileConfig): Promise<T>;
|
|
93
|
+
/**
|
|
94
|
+
* 判断 URL 是否可交给平台 getFetch 签名请求。
|
|
95
|
+
* @param url - 请求 URL。
|
|
96
|
+
* @returns 相对路径或同源 URL 返回 true。
|
|
97
|
+
*/
|
|
98
|
+
export declare function shouldUsePlatformFetch(url: string): boolean;
|
|
99
|
+
/**
|
|
100
|
+
* 请求动态服务 JSON。外部绝对 URL 暂时保留原生 fetch,避免签名外部地址。
|
|
101
|
+
* @param config - 请求配置。
|
|
102
|
+
* @returns JSON payload。
|
|
103
|
+
*/
|
|
104
|
+
export declare function requestDynamicJsonPayload<T = unknown>(config: PlatformRequestConfig): Promise<T>;
|
|
105
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 问数追溯展示工具 - 将结构化追溯事件格式化为右侧聊天可读文本。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-13
|
|
5
|
+
*/
|
|
6
|
+
import type { ConversationReturnItem, QueryTraceRelationDiagnostic } from '@fses/workbench-app/types';
|
|
7
|
+
/**
|
|
8
|
+
* 将关系诊断严重级别转为用户可读标签。
|
|
9
|
+
* @param severity - 后端结构化严重级别。
|
|
10
|
+
* @returns 用户可读严重级别。
|
|
11
|
+
*/
|
|
12
|
+
export declare function formatRelationDiagnosticSeverity(severity?: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* 将关系/字段诊断动作格式化为可复制的治理请求文本。
|
|
15
|
+
* @param diagnostic - 后端返回的关系/字段诊断。
|
|
16
|
+
* @returns 没有治理动作时返回空字符串。
|
|
17
|
+
*/
|
|
18
|
+
export declare function formatRelationDiagnosticGovernanceRequest(diagnostic: QueryTraceRelationDiagnostic): string;
|
|
19
|
+
/**
|
|
20
|
+
* 将问数追溯项格式化为右侧聊天状态行标题。
|
|
21
|
+
* @param item - 追溯返回项。
|
|
22
|
+
* @returns 状态行内容。
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatQueryTraceContent(item: ConversationReturnItem): string;
|
|
25
|
+
/**
|
|
26
|
+
* 将问数追溯项格式化为右侧聊天展开详情。
|
|
27
|
+
* @param item - 追溯返回项。
|
|
28
|
+
* @returns 展开详情文本。
|
|
29
|
+
*/
|
|
30
|
+
export declare function formatQueryTraceDetail(item: ConversationReturnItem): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MaterializedBlock, RuntimeCapabilityMount } from '@fses/workbench-app/types';
|
|
2
|
+
import { ROUTE_TARGETS, missingRuntimePrimitivesForCapability } from './runtimePrimitiveRegistry';
|
|
3
|
+
type CapabilitySlot = RuntimeCapabilityMount['slot'];
|
|
4
|
+
export { ROUTE_TARGETS, missingRuntimePrimitivesForCapability };
|
|
5
|
+
export declare function sanitizeRuntimeCapabilityMount(value: unknown): RuntimeCapabilityMount | null;
|
|
6
|
+
export declare function runtimeCapabilitiesForSlot(block: MaterializedBlock, slot: CapabilitySlot): RuntimeCapabilityMount[];
|
|
7
|
+
export declare function searchableTextForBlock(block: MaterializedBlock, fields: string[]): string;
|
|
8
|
+
export declare function searchBlocks(blocks: MaterializedBlock[], capability: RuntimeCapabilityMount, query: string): MaterializedBlock[];
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 工作台运行态身份头工具 - 为 run-agent HTTP 请求透传用户与租户上下文。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-02
|
|
5
|
+
*/
|
|
6
|
+
export interface RuntimeIdentityContext {
|
|
7
|
+
userId?: string;
|
|
8
|
+
tenantId?: string;
|
|
9
|
+
appId?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface RuntimeSemanticAppScope {
|
|
12
|
+
semanticAppId?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 从当前 URL 读取问数语义应用范围,兼容 search 与 hash query。
|
|
16
|
+
* @returns URL 中显式确认的数据应用 ID,缺失时返回 undefined。
|
|
17
|
+
*/
|
|
18
|
+
export declare function readRuntimeSemanticAppIdFromUrl(): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* 解析运行态租户 ID,优先使用上下文,其次 URL,最后使用本地默认租户。
|
|
21
|
+
* @param context - 当前运行态身份上下文。
|
|
22
|
+
* @returns 规范化后的租户 ID。
|
|
23
|
+
*/
|
|
24
|
+
export declare function resolveRuntimeTenantId(context: RuntimeIdentityContext): string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* 解析运行态应用 ID,优先使用上下文,其次 URL,最后使用 web-workbench。
|
|
27
|
+
* @param context - 当前运行态身份上下文。
|
|
28
|
+
* @returns 规范化后的应用 ID。
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveRuntimeAppId(context: RuntimeIdentityContext): string;
|
|
31
|
+
/**
|
|
32
|
+
* 构建 run-agent 运行态身份请求头。
|
|
33
|
+
* @param context - 当前运行态用户上下文。
|
|
34
|
+
* @returns 包含 ego-userinfo、tenant-id、tenant_id 和 x-tenant-id 的请求头。
|
|
35
|
+
*/
|
|
36
|
+
export declare function runtimeIdentityHeaders(context: RuntimeIdentityContext): Record<string, string>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { RuntimeCapabilityMount } from '@fses/workbench-app/types';
|
|
2
|
+
export type RuntimePrimitiveKind = 'slot' | 'ui' | 'data' | 'action' | 'trigger' | 'routeTarget';
|
|
3
|
+
export type RuntimePrimitiveStatus = 'active' | 'planned' | 'disabled';
|
|
4
|
+
export type RuntimePrimitiveRisk = 'low' | 'medium' | 'high' | 'forbidden';
|
|
5
|
+
export interface RuntimePrimitiveDefinition {
|
|
6
|
+
id: string;
|
|
7
|
+
kind: RuntimePrimitiveKind;
|
|
8
|
+
status: RuntimePrimitiveStatus;
|
|
9
|
+
displayName: string;
|
|
10
|
+
userFacingName: string;
|
|
11
|
+
description: string;
|
|
12
|
+
riskLevel: RuntimePrimitiveRisk;
|
|
13
|
+
sideEffects: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface RuntimePrimitiveGapDetail {
|
|
16
|
+
id: string;
|
|
17
|
+
userFacingName: string;
|
|
18
|
+
description: string;
|
|
19
|
+
status: 'planned' | 'unknown' | 'disabled';
|
|
20
|
+
}
|
|
21
|
+
export declare const RUNTIME_PRIMITIVE_DEFINITIONS: RuntimePrimitiveDefinition[];
|
|
22
|
+
export declare const ROUTE_TARGETS: {
|
|
23
|
+
readonly processCenter: {
|
|
24
|
+
readonly id: "processCenter";
|
|
25
|
+
readonly name: "流程中心";
|
|
26
|
+
readonly route: "/process-center";
|
|
27
|
+
readonly acceptedParams: readonly ["keyword", "source"];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function primitiveDefinition(id: string, kind?: RuntimePrimitiveKind): RuntimePrimitiveDefinition;
|
|
31
|
+
export declare function activePrimitiveIds(kind: RuntimePrimitiveKind): string[];
|
|
32
|
+
export declare function isActivePrimitive(id: string, kind: RuntimePrimitiveKind): boolean;
|
|
33
|
+
export declare function runtimeCapabilityPrimitiveIds(capability: RuntimeCapabilityMount): {
|
|
34
|
+
slot: import("@fses/workbench-card").RuntimeCapabilitySlot;
|
|
35
|
+
ui: import("@fses/workbench-card").RuntimeCapabilityUiKind;
|
|
36
|
+
icon: string;
|
|
37
|
+
data: import("@fses/workbench-card").RuntimeCapabilityDataSource;
|
|
38
|
+
actions: import("@fses/workbench-card").RuntimeCapabilityActionType[];
|
|
39
|
+
triggers: ("onSelectResult" | "onSubmit" | "onClick" | "onChange")[];
|
|
40
|
+
routeTargets: string[];
|
|
41
|
+
};
|
|
42
|
+
export declare function missingRuntimePrimitivesForCapability(capability: RuntimeCapabilityMount): string[];
|
|
43
|
+
export declare function primitiveGapDetails(ids: string[]): RuntimePrimitiveGapDetail[];
|
|
44
|
+
export declare function humanizePrimitiveId(id: string): string;
|
|
45
|
+
export declare function userFacingPrimitiveGapMessage(ids: string[], requestedAction?: string): string[];
|
|
46
|
+
export declare function primitiveGapTechnicalDetails(ids: string[], requestedAction?: string): {
|
|
47
|
+
missingPrimitives: string[];
|
|
48
|
+
gapType: string;
|
|
49
|
+
userNeed: string;
|
|
50
|
+
missingCapabilities: RuntimePrimitiveGapDetail[];
|
|
51
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 对话记录摘要预览工具 - 控制长过程详情的默认展示长度。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-05-14
|
|
5
|
+
*/
|
|
6
|
+
export declare const SUMMARY_PREVIEW_LINE_LIMIT = 3;
|
|
7
|
+
export declare const SUMMARY_PREVIEW_CHAR_LIMIT = 360;
|
|
8
|
+
export interface SummaryPreview {
|
|
9
|
+
text: string;
|
|
10
|
+
hasMore: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* 生成对话记录摘要的预览文本,默认保留前三行,长单行按字符数兜底截断。
|
|
14
|
+
* @param text - 原始摘要或详情文本。
|
|
15
|
+
* @param expanded - 是否已经展开完整内容。
|
|
16
|
+
* @returns 可展示的预览文本和是否存在更多内容。
|
|
17
|
+
*/
|
|
18
|
+
export declare function createSummaryPreview(text: string, expanded: boolean): SummaryPreview;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 系统卡片预览画像 - 为系统卡片默认样例和 hover 预览提供 capability 级差异化描述。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-18
|
|
5
|
+
*/
|
|
6
|
+
import type { CardRegistryEntry } from '@fses/workbench-app/types';
|
|
7
|
+
export type SystemCardPreviewTone = 'neutral' | 'success' | 'warning' | 'danger' | 'info';
|
|
8
|
+
export type SystemCardPreviewLayoutHint = 'metric' | 'table' | 'matrix' | 'timeline' | 'narrative' | 'network' | 'profile' | 'workflow' | 'map' | 'customCanvas' | 'embed';
|
|
9
|
+
export interface SystemCardPreviewProfile {
|
|
10
|
+
capabilityId: string;
|
|
11
|
+
previewKind: string;
|
|
12
|
+
layoutHint: SystemCardPreviewLayoutHint;
|
|
13
|
+
sampleTone: SystemCardPreviewTone;
|
|
14
|
+
sampleTitle: string;
|
|
15
|
+
explicit: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const EXPLICIT_SYSTEM_CARD_PREVIEW_PROFILE_IDS: string[];
|
|
18
|
+
/**
|
|
19
|
+
* 根据系统卡片注册项解析默认预览画像。
|
|
20
|
+
* @param entry - 系统卡片注册项。
|
|
21
|
+
* @returns capability 级预览画像。
|
|
22
|
+
*/
|
|
23
|
+
export declare function resolveSystemCardPreviewProfile(entry: CardRegistryEntry): SystemCardPreviewProfile;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview 用户可见文本安全过滤 - 防止规划和问数追溯向业务用户暴露 code、ID、表字段名。
|
|
3
|
+
* @author seadon
|
|
4
|
+
* @created 2026-06-13
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* 判断文本是否包含技术标识。
|
|
8
|
+
* @param value - 待检查文本。
|
|
9
|
+
* @returns 包含技术标识时返回 true。
|
|
10
|
+
*/
|
|
11
|
+
export declare function userVisibleTextHasTechnicalIdentifier(value: string): boolean;
|
|
12
|
+
/**
|
|
13
|
+
* 清理用户可见文本。
|
|
14
|
+
* @param value - 待清理文本。
|
|
15
|
+
* @returns 安全文本;不安全时返回空字符串。
|
|
16
|
+
*/
|
|
17
|
+
export declare function sanitizeUserVisibleText(value: unknown): string;
|
|
18
|
+
/**
|
|
19
|
+
* 清理并保序去重用户可见文本列表。
|
|
20
|
+
* @param values - 候选文本列表。
|
|
21
|
+
* @returns 安全文本列表。
|
|
22
|
+
*/
|
|
23
|
+
export declare function sanitizeUserVisibleTextList(values: unknown[]): string[];
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type ClassValue } from 'clsx';
|
|
2
|
+
export { formatDate, formatNumber } from './formatters';
|
|
3
|
+
/**
|
|
4
|
+
* 合并 Tailwind CSS 类名的工具函数
|
|
5
|
+
* @param inputs - 类名数组或对象
|
|
6
|
+
* @returns 合并后的类名字符串
|
|
7
|
+
*/
|
|
8
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
9
|
+
/**
|
|
10
|
+
* 生成随机 ID
|
|
11
|
+
* @param length - ID 长度
|
|
12
|
+
* @returns 随机 ID 字符串
|
|
13
|
+
*/
|
|
14
|
+
export declare function generateId(length?: number): string;
|
|
15
|
+
/**
|
|
16
|
+
* 防抖函数
|
|
17
|
+
* @param func - 要防抖的函数
|
|
18
|
+
* @param wait - 等待时间(毫秒)
|
|
19
|
+
* @returns 防抖后的函数
|
|
20
|
+
*/
|
|
21
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait: number): (...args: Parameters<T>) => void;
|
|
22
|
+
/**
|
|
23
|
+
* 节流函数
|
|
24
|
+
* @param func - 要节流的函数
|
|
25
|
+
* @param limit - 时间限制(毫秒)
|
|
26
|
+
* @returns 节流后的函数
|
|
27
|
+
*/
|
|
28
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, limit: number): (...args: Parameters<T>) => void;
|
|
29
|
+
/**
|
|
30
|
+
* 检查是否为移动设备
|
|
31
|
+
* @returns 是否为移动设备
|
|
32
|
+
*/
|
|
33
|
+
export declare function isMobile(): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 检查是否为暗色模式
|
|
36
|
+
* @returns 是否为暗色模式
|
|
37
|
+
*/
|
|
38
|
+
export declare function isDarkMode(): boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 切换暗色模式
|
|
41
|
+
*/
|
|
42
|
+
export declare function toggleDarkMode(): void;
|
|
43
|
+
/**
|
|
44
|
+
* 初始化暗色模式
|
|
45
|
+
*/
|
|
46
|
+
export declare function initDarkMode(): void;
|