@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.
Files changed (236) hide show
  1. package/LICENSE +9 -0
  2. package/dist/Workspace-DP3xr4Jp.js +42979 -0
  3. package/dist/adapters/defaults.d.ts +15 -0
  4. package/dist/adapters/index.d.ts +8 -0
  5. package/dist/adapters/testDoubles.d.ts +12 -0
  6. package/dist/adapters/types.d.ts +84 -0
  7. package/dist/canvas/api/types.d.ts +117 -0
  8. package/dist/canvas/bridge/workbenchCanvasBus.d.ts +7 -0
  9. package/dist/canvas/layout/logicalLayoutEngine.d.ts +85 -0
  10. package/dist/canvas/persistence/canvasSnapshotStorage.d.ts +3 -0
  11. package/dist/card/index.d.ts +8 -0
  12. package/dist/card/index.js +17 -0
  13. package/dist/chat/index.d.ts +9 -0
  14. package/dist/chat/index.js +12 -0
  15. package/dist/components/WorkbenchAppHost.vue.d.ts +28 -0
  16. package/dist/components/WorkbenchApplication.vue.d.ts +13 -0
  17. package/dist/components/WorkbenchShell.vue.d.ts +32 -0
  18. package/dist/components/WorkbenchWorkspaceCore.vue.d.ts +20 -0
  19. package/dist/config/workbenchAppConfig.d.ts +43 -0
  20. package/dist/contracts/index.d.ts +7 -0
  21. package/dist/contracts/index.js +6 -0
  22. package/dist/extensions/index.d.ts +59 -0
  23. package/dist/fde-runtime/runtime/fdeSkillDisplayLabel.d.ts +15 -0
  24. package/dist/fses-workbench-app.js +91 -0
  25. package/dist/index-A8Vg4UXL.js +1091 -0
  26. package/dist/index.d.ts +39 -0
  27. package/dist/internal/personal-workbench/canvas-runtime/api/canvasFacade.d.ts +2 -0
  28. package/dist/internal/personal-workbench/canvas-runtime/api/types.d.ts +6 -0
  29. package/dist/internal/personal-workbench/canvas-runtime/factory/cardFactory.d.ts +25 -0
  30. package/dist/internal/personal-workbench/canvas-runtime/layout/logicalLayoutEngine.d.ts +6 -0
  31. package/dist/internal/personal-workbench/canvas-runtime/layout/recommendedCardPlacement.d.ts +54 -0
  32. package/dist/internal/personal-workbench/canvas-runtime/lifecycle/cardLifecycleService.d.ts +12 -0
  33. package/dist/internal/personal-workbench/canvas-runtime/primitive/primitivePolicyGate.d.ts +9 -0
  34. package/dist/internal/personal-workbench/components/runtime/RuntimeCapabilitySlots.vue.d.ts +14 -0
  35. package/dist/internal/personal-workbench/components/workbench/ChartLinkageConfigModal.vue.d.ts +23 -0
  36. package/dist/internal/personal-workbench/components/workbench/ConversationTurnCard.vue.d.ts +23 -0
  37. package/dist/internal/personal-workbench/components/workbench/GridStackCanvas.vue.d.ts +91 -0
  38. package/dist/internal/personal-workbench/components/workbench/GridStackCardShell.vue.d.ts +49 -0
  39. package/dist/internal/personal-workbench/components/workbench/GridStackContainer.vue.d.ts +39 -0
  40. package/dist/internal/personal-workbench/components/workbench/LayoutPicker.vue.d.ts +13 -0
  41. package/dist/internal/personal-workbench/components/workbench/StudioComposer.vue.d.ts +24 -0
  42. package/dist/internal/personal-workbench/components/workbench/SystemCardPreviewPopover.vue.d.ts +17 -0
  43. package/dist/internal/personal-workbench/components/workbench/WelcomeBanner.vue.d.ts +19 -0
  44. package/dist/internal/personal-workbench/components/workbench/WorkbenchAccessDenied.vue.d.ts +7 -0
  45. package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvas.vue.d.ts +290 -0
  46. package/dist/internal/personal-workbench/components/workbench/WorkbenchCanvasSettingsMenu.vue.d.ts +40 -0
  47. package/dist/internal/personal-workbench/components/workbench/WorkbenchCardConfigDialog.vue.d.ts +14 -0
  48. package/dist/internal/personal-workbench/components/workbench/WorkbenchDropdownPortal.vue.d.ts +32 -0
  49. package/dist/internal/personal-workbench/components/workbench/WorkbenchFdeCardCatalog.vue.d.ts +12 -0
  50. package/dist/internal/personal-workbench/components/workbench/WorkbenchListPopover.vue.d.ts +15 -0
  51. package/dist/internal/personal-workbench/components/workbench/WorkbenchMetricFilterBindingEditor.vue.d.ts +14 -0
  52. package/dist/internal/personal-workbench/components/workbench/WorkbenchRecommendationFieldConfigDialog.vue.d.ts +14 -0
  53. package/dist/internal/personal-workbench/components/workbench/WorkbenchStudio.vue.d.ts +301 -0
  54. package/dist/internal/personal-workbench/components/workbench/WorkbenchThemePicker.vue.d.ts +10 -0
  55. package/dist/internal/personal-workbench/components/workbench/helpers.d.ts +18 -0
  56. package/dist/internal/personal-workbench/components/workbench/showcase/WorkbenchShowcase.vue.d.ts +273 -0
  57. package/dist/internal/personal-workbench/composables/useWorkbenchRuntime.d.ts +9 -0
  58. package/dist/internal/personal-workbench/extensions/cards/customCardCatalog.d.ts +27 -0
  59. package/dist/internal/personal-workbench/extensions/cards/customComponentRegistry.d.ts +7 -0
  60. package/dist/internal/personal-workbench/extensions/cards/userCustomCardInsertion.d.ts +21 -0
  61. package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedCards.d.ts +2 -0
  62. package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedDashboard.d.ts +1 -0
  63. package/dist/internal/personal-workbench/extensions/fde/fdeGeneratedTemplatePage.d.ts +1 -0
  64. package/dist/internal/personal-workbench/extensions/fde/fdeSkillWorkbenchTheme.d.ts +1 -0
  65. package/dist/internal/personal-workbench/extensions/runtimeExtensions.d.ts +37 -0
  66. package/dist/internal/personal-workbench/extensions/workbenchAdapters.d.ts +1 -0
  67. package/dist/internal/personal-workbench/extensions/workbenchConfig.d.ts +1 -0
  68. package/dist/internal/personal-workbench/extensions/workbenchExtensions.d.ts +1 -0
  69. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillCardsHost.vue.d.ts +2 -0
  70. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillChartCard.vue.d.ts +57 -0
  71. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitHeader.vue.d.ts +6 -0
  72. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardCockpitTitle.vue.d.ts +5 -0
  73. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardGrid.vue.d.ts +57 -0
  74. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHeaderBand.vue.d.ts +6 -0
  75. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardHost.vue.d.ts +2 -0
  76. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardKpiItem.vue.d.ts +6 -0
  77. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardMarqueeList.vue.d.ts +6 -0
  78. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardShell.vue.d.ts +21 -0
  79. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardSummaryHeader.vue.d.ts +6 -0
  80. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDashboardWidget.vue.d.ts +56 -0
  81. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillDrilldownModal.vue.d.ts +20 -0
  82. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillFilterBar.vue.d.ts +18 -0
  83. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillHeaderCard.vue.d.ts +6 -0
  84. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillListCard.vue.d.ts +21 -0
  85. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillMetricChartToolbar.vue.d.ts +20 -0
  86. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillNumberCard.vue.d.ts +21 -0
  87. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillProtocolChartRenderer.vue.d.ts +18 -0
  88. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillQueryCard.vue.d.ts +23 -0
  89. package/dist/internal/personal-workbench/fde-skill-cards/components/FdeSkillTemplatePageHost.vue.d.ts +2 -0
  90. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillCardTypes.d.ts +514 -0
  91. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDataRequestMeta.d.ts +13 -0
  92. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartDensityFit.d.ts +67 -0
  93. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartOptions.d.ts +14 -0
  94. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillChartTheme.d.ts +51 -0
  95. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardContext.d.ts +19 -0
  96. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardDrilldown.d.ts +21 -0
  97. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardKpi.d.ts +36 -0
  98. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardLayout.d.ts +39 -0
  99. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardRefresh.d.ts +24 -0
  100. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardThemes.d.ts +108 -0
  101. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardTypes.d.ts +87 -0
  102. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDashboardViewport.d.ts +71 -0
  103. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDataRefresh.d.ts +59 -0
  104. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillDisplayLabel.d.ts +6 -0
  105. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterBarBridge.d.ts +100 -0
  106. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterDefaults.d.ts +21 -0
  107. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFilterOptions.d.ts +95 -0
  108. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillFloatingAction.d.ts +19 -0
  109. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillJson.d.ts +11 -0
  110. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillListMarquee.d.ts +32 -0
  111. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricChartDrilldown.d.ts +101 -0
  112. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillMetricNumberDetail.d.ts +19 -0
  113. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillNumberFormat.d.ts +17 -0
  114. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChart.d.ts +37 -0
  115. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartApi.d.ts +17 -0
  116. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDisplayData.d.ts +10 -0
  117. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartDrilldown.d.ts +68 -0
  118. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartLinkage.d.ts +19 -0
  119. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillProtocolChartRefresh.d.ts +19 -0
  120. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillQueryFilters.d.ts +82 -0
  121. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceDrilldown.d.ts +89 -0
  122. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillServiceFields.d.ts +17 -0
  123. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageMount.d.ts +37 -0
  124. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTemplatePageTypes.d.ts +59 -0
  125. package/dist/internal/personal-workbench/fde-skill-cards/runtime/fdeSkillTimeRangeDefault.d.ts +45 -0
  126. package/dist/internal/personal-workbench/lib/agentMemoryClient.d.ts +376 -0
  127. package/dist/internal/personal-workbench/lib/aiChartProtocol.d.ts +31 -0
  128. package/dist/internal/personal-workbench/lib/aiMetricCardSpec.d.ts +89 -0
  129. package/dist/internal/personal-workbench/lib/artifactRules.d.ts +15 -0
  130. package/dist/internal/personal-workbench/lib/assistantPersona.d.ts +28 -0
  131. package/dist/internal/personal-workbench/lib/assistantPersonaProfiles.d.ts +21 -0
  132. package/dist/internal/personal-workbench/lib/businessGroupClient.d.ts +25 -0
  133. package/dist/internal/personal-workbench/lib/canonicalLayoutContext.d.ts +38 -0
  134. package/dist/internal/personal-workbench/lib/cardContractDemo.d.ts +20 -0
  135. package/dist/internal/personal-workbench/lib/cardDisplay.d.ts +1 -0
  136. package/dist/internal/personal-workbench/lib/cardSizeConfig.d.ts +29 -0
  137. package/dist/internal/personal-workbench/lib/cardStyleConfig.d.ts +128 -0
  138. package/dist/internal/personal-workbench/lib/conversationScreenContext.d.ts +30 -0
  139. package/dist/internal/personal-workbench/lib/deepAgentApi.d.ts +133 -0
  140. package/dist/internal/personal-workbench/lib/deepAgentProcessGroups.d.ts +6 -0
  141. package/dist/internal/personal-workbench/lib/deepAgentProgressMessage.d.ts +6 -0
  142. package/dist/internal/personal-workbench/lib/deepAgentToolDisplayName.d.ts +6 -0
  143. package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardMutation.d.ts +39 -0
  144. package/dist/internal/personal-workbench/lib/deepAgentWorkbenchCardRecommendation.d.ts +66 -0
  145. package/dist/internal/personal-workbench/lib/dynamicEchartOption.d.ts +14 -0
  146. package/dist/internal/personal-workbench/lib/echartsOptionEditorBridge.d.ts +34 -0
  147. package/dist/internal/personal-workbench/lib/echartsProtocolDataSlimming.d.ts +24 -0
  148. package/dist/internal/personal-workbench/lib/echartsTemplateAssets.d.ts +24 -0
  149. package/dist/internal/personal-workbench/lib/echartsTemplateMaterializer.d.ts +31 -0
  150. package/dist/internal/personal-workbench/lib/fdeWorkbenchAssetPackage.d.ts +107 -0
  151. package/dist/internal/personal-workbench/lib/fdeWorkbenchConfigClient.d.ts +96 -0
  152. package/dist/internal/personal-workbench/lib/formatters.d.ts +5 -0
  153. package/dist/internal/personal-workbench/lib/historyCardBindingRestore.fixture.d.ts +15 -0
  154. package/dist/internal/personal-workbench/lib/platformFetchClient.d.ts +105 -0
  155. package/dist/internal/personal-workbench/lib/queryTraceDisplay.d.ts +30 -0
  156. package/dist/internal/personal-workbench/lib/runtimeCapabilities.d.ts +8 -0
  157. package/dist/internal/personal-workbench/lib/runtimeIdentity.d.ts +36 -0
  158. package/dist/internal/personal-workbench/lib/runtimePrimitiveRegistry.d.ts +51 -0
  159. package/dist/internal/personal-workbench/lib/summaryPreview.d.ts +18 -0
  160. package/dist/internal/personal-workbench/lib/systemCardPreviewProfile.d.ts +23 -0
  161. package/dist/internal/personal-workbench/lib/userVisibleTextGuard.d.ts +23 -0
  162. package/dist/internal/personal-workbench/lib/utils.d.ts +46 -0
  163. package/dist/internal/personal-workbench/lib/vueRuntimeAdapters.d.ts +450 -0
  164. package/dist/internal/personal-workbench/lib/workbenchApi.d.ts +686 -0
  165. package/dist/internal/personal-workbench/lib/workbenchAttachmentUpload.d.ts +47 -0
  166. package/dist/internal/personal-workbench/lib/workbenchAutoRefreshSession.d.ts +21 -0
  167. package/dist/internal/personal-workbench/lib/workbenchBusinessGapDiagnostics.d.ts +16 -0
  168. package/dist/internal/personal-workbench/lib/workbenchCanvasBusinessGapChecklist.d.ts +106 -0
  169. package/dist/internal/personal-workbench/lib/workbenchCanvasClassification.d.ts +119 -0
  170. package/dist/internal/personal-workbench/lib/workbenchCanvasDiagnostics.d.ts +100 -0
  171. package/dist/internal/personal-workbench/lib/workbenchCanvasImageCardVisual.d.ts +168 -0
  172. package/dist/internal/personal-workbench/lib/workbenchCanvasImageCompose.d.ts +106 -0
  173. package/dist/internal/personal-workbench/lib/workbenchCanvasLayoutOverride.d.ts +46 -0
  174. package/dist/internal/personal-workbench/lib/workbenchCardConfigProfile.d.ts +45 -0
  175. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationBinding.d.ts +64 -0
  176. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationFallback.d.ts +24 -0
  177. package/dist/internal/personal-workbench/lib/workbenchCardRecommendationViews.d.ts +24 -0
  178. package/dist/internal/personal-workbench/lib/workbenchCardUsabilityProfile.d.ts +33 -0
  179. package/dist/internal/personal-workbench/lib/workbenchChatHistory.d.ts +19 -0
  180. package/dist/internal/personal-workbench/lib/workbenchChatHistoryReplay.d.ts +25 -0
  181. package/dist/internal/personal-workbench/lib/workbenchChatMessageOrdering.d.ts +6 -0
  182. package/dist/internal/personal-workbench/lib/workbenchChatPendingTurn.d.ts +21 -0
  183. package/dist/internal/personal-workbench/lib/workbenchChatReplyBridge.d.ts +55 -0
  184. package/dist/internal/personal-workbench/lib/workbenchChatStatusCompletion.d.ts +6 -0
  185. package/dist/internal/personal-workbench/lib/workbenchChatTurnSignature.d.ts +6 -0
  186. package/dist/internal/personal-workbench/lib/workbenchConfigDraftReseed.d.ts +18 -0
  187. package/dist/internal/personal-workbench/lib/workbenchCustomCardCatalog.d.ts +16 -0
  188. package/dist/internal/personal-workbench/lib/workbenchCustomComponentRegistry.d.ts +4 -0
  189. package/dist/internal/personal-workbench/lib/workbenchDataBindingBadge.d.ts +19 -0
  190. package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshPolicy.d.ts +6 -0
  191. package/dist/internal/personal-workbench/lib/workbenchDataBindingRefreshTarget.d.ts +47 -0
  192. package/dist/internal/personal-workbench/lib/workbenchDeleteLayoutCompact.d.ts +41 -0
  193. package/dist/internal/personal-workbench/lib/workbenchEntryParams.d.ts +50 -0
  194. package/dist/internal/personal-workbench/lib/workbenchGridstackAdapter.d.ts +231 -0
  195. package/dist/internal/personal-workbench/lib/workbenchGridstackSaveLayout.d.ts +48 -0
  196. package/dist/internal/personal-workbench/lib/workbenchImageCanvasSizing.d.ts +45 -0
  197. package/dist/internal/personal-workbench/lib/workbenchImageComposeEntry.d.ts +53 -0
  198. package/dist/internal/personal-workbench/lib/workbenchImageGridstackRowRecovery.d.ts +93 -0
  199. package/dist/internal/personal-workbench/lib/workbenchLayout.d.ts +174 -0
  200. package/dist/internal/personal-workbench/lib/workbenchManualReplacement.d.ts +87 -0
  201. package/dist/internal/personal-workbench/lib/workbenchMetricChartDetail.d.ts +75 -0
  202. package/dist/internal/personal-workbench/lib/workbenchMetricDetailApi.d.ts +62 -0
  203. package/dist/internal/personal-workbench/lib/workbenchMetricFilterBinding.d.ts +85 -0
  204. package/dist/internal/personal-workbench/lib/workbenchMetricFilterLinkage.d.ts +30 -0
  205. package/dist/internal/personal-workbench/lib/workbenchPendingPatch.d.ts +54 -0
  206. package/dist/internal/personal-workbench/lib/workbenchRemoteClient.d.ts +39 -0
  207. package/dist/internal/personal-workbench/lib/workbenchShellSplit.d.ts +107 -0
  208. package/dist/internal/personal-workbench/lib/workbenchShowcase.d.ts +60 -0
  209. package/dist/internal/personal-workbench/lib/workbenchSocketClient.d.ts +28 -0
  210. package/dist/internal/personal-workbench/lib/workbenchStorage.d.ts +67 -0
  211. package/dist/internal/personal-workbench/lib/workbenchSystemCardPreviews.d.ts +31 -0
  212. package/dist/internal/personal-workbench/lib/workbenchSystemCardPrompt.d.ts +36 -0
  213. package/dist/internal/personal-workbench/lib/workbenchTextIntent.d.ts +11 -0
  214. package/dist/internal/personal-workbench/lib/workbenchThemes.d.ts +6 -0
  215. package/dist/internal/personal-workbench/lib/workbenchV2Adapter.d.ts +49 -0
  216. package/dist/internal/personal-workbench/pages/Workspace.vue.d.ts +7 -0
  217. package/dist/internal/personal-workbench/stores/workbenchRuntime.d.ts +170 -0
  218. package/dist/internal/personal-workbench/themes/index.d.ts +6 -0
  219. package/dist/internal/personal-workbench/themes/workbenchThemeDefinitions.d.ts +78 -0
  220. package/dist/internal/personal-workbench/types/workbenchV2.d.ts +211 -0
  221. package/dist/internal/personal-workbench/vue-types/workbenchRuntime.d.ts +191 -0
  222. package/dist/runtime/context/workbenchAppContext.d.ts +32 -0
  223. package/dist/runtime/conversation/workbenchChatMessageOrdering.d.ts +50 -0
  224. package/dist/runtime/conversation/workbenchChatStatusCompletion.d.ts +27 -0
  225. package/dist/runtime/conversation/workbenchChatTurnSignature.d.ts +11 -0
  226. package/dist/runtime/data-binding/workbenchDataBindingRefreshPolicy.d.ts +36 -0
  227. package/dist/runtime/deep-agent/deepAgentProcessGroups.d.ts +84 -0
  228. package/dist/runtime/deep-agent/deepAgentProgressMessage.d.ts +22 -0
  229. package/dist/runtime/deep-agent/deepAgentToolDisplayName.d.ts +12 -0
  230. package/dist/runtime/index.d.ts +8 -0
  231. package/dist/runtime/index.js +5 -0
  232. package/dist/runtime/store/workbenchRuntimeFacade.d.ts +16 -0
  233. package/dist/style.css +1 -0
  234. package/dist/types/index.d.ts +19 -0
  235. package/dist/useWorkbenchRuntime-Pekhufen.js +26338 -0
  236. package/package.json +143 -0
@@ -0,0 +1,21 @@
1
+ import type { AssistantPersonaKey, AssistantPersonaPayload } from '@fses/workbench-app/types';
2
+ export declare const DEFAULT_ASSISTANT_PERSONA: AssistantPersonaKey;
3
+ export declare const ASSISTANT_PERSONA_PROFILES: readonly [{
4
+ readonly key: "warm";
5
+ readonly label: "热情";
6
+ readonly shortDescription: "主动联想,温暖充足";
7
+ readonly prompt: string;
8
+ }, {
9
+ readonly key: "professional";
10
+ readonly label: "专业";
11
+ readonly shortDescription: "严谨克制,有理有据";
12
+ readonly prompt: string;
13
+ }, {
14
+ readonly key: "reserved";
15
+ readonly label: "内敛";
16
+ readonly shortDescription: "安静克制,简洁稳妥";
17
+ readonly prompt: string;
18
+ }];
19
+ export declare function normalizeAssistantPersonaKey(value: unknown): AssistantPersonaKey;
20
+ export declare function getAssistantPersonaProfile(value: unknown): AssistantPersonaPayload;
21
+ export declare function buildAssistantPersonaPayload(value: unknown): AssistantPersonaPayload;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * @fileoverview 业务分组客户端 - 获取 SP 业务分组和分组资源并归一化为聊天上下文。
3
+ * @author seadon
4
+ * @created 2026-06-07
5
+ */
6
+ import type { BusinessGroupOption, BusinessGroupResources } from '@fses/workbench-app/types';
7
+ interface BusinessGroupClientContext {
8
+ userId?: string;
9
+ }
10
+ interface BusinessGroupResourcesInput extends BusinessGroupClientContext {
11
+ businessGroupCode: string;
12
+ }
13
+ /**
14
+ * 获取 SP 业务分组列表。
15
+ * @param context - 当前运行态用户上下文。
16
+ * @returns 归一化后的业务分组选项。
17
+ */
18
+ export declare function fetchBusinessGroups(context?: BusinessGroupClientContext): Promise<BusinessGroupOption[]>;
19
+ /**
20
+ * 获取 SP 业务分组资源。
21
+ * @param input - 业务分组编码与当前运行态用户上下文。
22
+ * @returns 归一化后的模型和指标资源。
23
+ */
24
+ export declare function fetchBusinessGroupResources(input: BusinessGroupResourcesInput): Promise<BusinessGroupResources>;
25
+ export {};
@@ -0,0 +1,38 @@
1
+ /**
2
+ * @fileoverview Canonical layout context helpers - builds stable persisted-layout summaries for card operations.
3
+ * @author seadon
4
+ * @created 2026-07-11
5
+ */
6
+ import type { BlockLayout, WorkbenchSnapshot } from '@fses/workbench-app/types';
7
+ export interface CanonicalLayoutContext extends Record<string, unknown> {
8
+ baseVersion: number;
9
+ layoutVersion: number;
10
+ layoutSource: 'gridstack_layout_tree' | 'block_layout';
11
+ layoutFingerprint: string;
12
+ layoutTree?: Record<string, unknown>;
13
+ blockLayouts?: Array<{
14
+ blockId: string;
15
+ layout: Pick<BlockLayout, 'x' | 'y' | 'w' | 'h'>;
16
+ }>;
17
+ updatedAt?: string;
18
+ }
19
+ interface FingerprintNode {
20
+ id: string;
21
+ x: number;
22
+ y: number;
23
+ w: number;
24
+ h: number;
25
+ }
26
+ /**
27
+ * Builds a canonical layout summary from the persisted workbench snapshot.
28
+ * @param snapshot - Current persisted workbench snapshot.
29
+ * @returns Canonical layout context, or undefined when no snapshot is available.
30
+ */
31
+ export declare function buildCanonicalLayoutContext(snapshot: WorkbenchSnapshot | null | undefined): CanonicalLayoutContext | undefined;
32
+ /**
33
+ * Generates a stable fingerprint for layout nodes independent of input ordering.
34
+ * @param nodes - Layout nodes to fingerprint.
35
+ * @returns Stable short layout hash.
36
+ */
37
+ export declare function fingerprintLayoutNodes(nodes: FingerprintNode[]): string;
38
+ export {};
@@ -0,0 +1,20 @@
1
+ export interface DemoCardContract {
2
+ capabilityId: string;
3
+ contractVersion: string;
4
+ dataMode: 'manualDemo';
5
+ title?: string;
6
+ category?: string;
7
+ rendererKey?: string;
8
+ dataShape?: string;
9
+ outputSchema: Record<string, unknown>;
10
+ defaultData: Record<string, unknown>;
11
+ }
12
+ export declare const DEMO_BAR_CHART_CAPABILITY_ID = "card.chart.bar";
13
+ export declare const DEMO_CUSTOM_ECHARTS_CAPABILITY_ID = "card.chart.customEcharts";
14
+ export declare function supportsDemoCardContract(capabilityId: string): boolean;
15
+ export declare function supportsNativeEchartsOption(capabilityId: string): capabilityId is "card.chart.customEcharts";
16
+ export declare function defaultDemoCardContract(capabilityId: string): DemoCardContract | null;
17
+ export declare function readDemoCardContract(capabilityId: string): DemoCardContract | null;
18
+ export declare function writeDemoCardContract(contract: DemoCardContract): void;
19
+ export declare function resetDemoCardContract(capabilityId: string): void;
20
+ export declare function demoDefaultDataForCapability(capabilityId: string): Record<string, unknown> | null;
@@ -0,0 +1 @@
1
+ export declare function displayCardSubtitle(subtitle: unknown): string;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @fileoverview 工作台卡片尺寸配置 - 统一管理卡片尺寸预设、画布间距和持久化配置归一化
3
+ * @author seadon
4
+ * @created 2026-05-14
5
+ */
6
+ import type { CardSizePreset } from '@fses/workbench-app/canvas/api/types';
7
+ export interface WorkbenchCardPresetSize {
8
+ w: number;
9
+ h: number;
10
+ }
11
+ export type WorkbenchCardPresetSizeConfig = Record<CardSizePreset, WorkbenchCardPresetSize>;
12
+ export type WorkbenchCanvasGapPreset = 'large' | 'medium' | 'small' | 'none';
13
+ export declare const WORKBENCH_CARD_SIZE_PRESETS: Array<{
14
+ preset: CardSizePreset;
15
+ label: string;
16
+ description: string;
17
+ }>;
18
+ export declare const DEFAULT_WORKBENCH_CARD_PRESET_SIZE_CONFIG: WorkbenchCardPresetSizeConfig;
19
+ export declare const WORKBENCH_CANVAS_GAP_PRESETS: Array<{
20
+ preset: WorkbenchCanvasGapPreset;
21
+ label: string;
22
+ px: number;
23
+ }>;
24
+ export declare const DEFAULT_WORKBENCH_CANVAS_GAP_PRESET: WorkbenchCanvasGapPreset;
25
+ export declare const DEFAULT_WORKBENCH_CANVAS_GAP_PX = 10;
26
+ export declare function normalizeWorkbenchCardPresetSizeConfig(value: unknown): WorkbenchCardPresetSizeConfig;
27
+ export declare function sameWorkbenchCardPresetSizeConfig(left: WorkbenchCardPresetSizeConfig, right: WorkbenchCardPresetSizeConfig): boolean;
28
+ export declare function normalizeWorkbenchCanvasGapPreset(value: unknown): WorkbenchCanvasGapPreset;
29
+ export declare function canvasGapPresetToPx(preset: WorkbenchCanvasGapPreset): number;
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @fileoverview 工作台卡片外壳样式配置 - 负责本地 UI 风格与远端 visualConfig 的互转
3
+ * @author seadon
4
+ * @created 2026-05-10
5
+ */
6
+ import type { WorkbenchSnapshot } from '@fses/workbench-app/types';
7
+ export type WorkbenchCardRadius = 'square' | 'small' | 'standard' | 'large';
8
+ export type WorkbenchCardBorder = 'none' | 'light' | 'strong';
9
+ export type WorkbenchCardShadow = 'none' | 'soft' | 'strong';
10
+ export type WorkbenchCardTexture = 'white' | 'muted' | 'glass' | 'texture' | 'color';
11
+ export type WorkbenchCardMotion = 'none' | 'lift' | 'glow';
12
+ export type WorkbenchCardDensity = 'loose' | 'standard' | 'compact';
13
+ export interface WorkbenchCardStyleConfig {
14
+ radius: WorkbenchCardRadius;
15
+ border: WorkbenchCardBorder;
16
+ shadow: WorkbenchCardShadow;
17
+ texture: WorkbenchCardTexture;
18
+ textureColor: string;
19
+ motion: WorkbenchCardMotion;
20
+ density: WorkbenchCardDensity;
21
+ }
22
+ export type WorkbenchCardStyleGroupKey = Exclude<keyof WorkbenchCardStyleConfig, 'textureColor'>;
23
+ export type WorkbenchCardStyleValue = WorkbenchCardStyleConfig[WorkbenchCardStyleGroupKey];
24
+ export declare const DEFAULT_WORKBENCH_CARD_STYLE_CONFIG: WorkbenchCardStyleConfig;
25
+ export declare const WORKBENCH_CARD_STYLE_GROUPS: readonly [{
26
+ readonly key: "radius";
27
+ readonly label: "圆角";
28
+ readonly options: readonly [{
29
+ readonly value: "square";
30
+ readonly label: "直角";
31
+ }, {
32
+ readonly value: "small";
33
+ readonly label: "小圆角";
34
+ }, {
35
+ readonly value: "standard";
36
+ readonly label: "标准圆角";
37
+ }, {
38
+ readonly value: "large";
39
+ readonly label: "大圆角";
40
+ }];
41
+ }, {
42
+ readonly key: "border";
43
+ readonly label: "边框";
44
+ readonly options: readonly [{
45
+ readonly value: "none";
46
+ readonly label: "无边框";
47
+ }, {
48
+ readonly value: "light";
49
+ readonly label: "浅色细边框";
50
+ }, {
51
+ readonly value: "strong";
52
+ readonly label: "强边框";
53
+ }];
54
+ }, {
55
+ readonly key: "shadow";
56
+ readonly label: "阴影";
57
+ readonly options: readonly [{
58
+ readonly value: "none";
59
+ readonly label: "无阴影";
60
+ }, {
61
+ readonly value: "soft";
62
+ readonly label: "弱悬浮";
63
+ }, {
64
+ readonly value: "strong";
65
+ readonly label: "强悬浮";
66
+ }];
67
+ }, {
68
+ readonly key: "texture";
69
+ readonly label: "质感";
70
+ readonly options: readonly [{
71
+ readonly value: "white";
72
+ readonly label: "纯白";
73
+ }, {
74
+ readonly value: "muted";
75
+ readonly label: "浅灰底";
76
+ }, {
77
+ readonly value: "glass";
78
+ readonly label: "磨砂玻璃";
79
+ }, {
80
+ readonly value: "texture";
81
+ readonly label: "纹理底";
82
+ }];
83
+ }, {
84
+ readonly key: "motion";
85
+ readonly label: "动效";
86
+ readonly options: readonly [{
87
+ readonly value: "none";
88
+ readonly label: "无动效";
89
+ }, {
90
+ readonly value: "lift";
91
+ readonly label: "悬浮微动";
92
+ }, {
93
+ readonly value: "glow";
94
+ readonly label: "渐变光效";
95
+ }];
96
+ }, {
97
+ readonly key: "density";
98
+ readonly label: "密度";
99
+ readonly options: readonly [{
100
+ readonly value: "loose";
101
+ readonly label: "宽松版";
102
+ }, {
103
+ readonly value: "standard";
104
+ readonly label: "标准版";
105
+ }, {
106
+ readonly value: "compact";
107
+ readonly label: "高密度紧凑版";
108
+ }];
109
+ }];
110
+ export declare function normalizeWorkbenchCardStyleConfig(value: unknown): WorkbenchCardStyleConfig;
111
+ /**
112
+ * 判断卡片外壳样式是否仍是系统默认值。
113
+ * @param value - 候选卡片样式配置。
114
+ * @returns 与默认配置完全一致时返回 true。
115
+ */
116
+ export declare function isDefaultWorkbenchCardStyleConfig(value: unknown): boolean;
117
+ /**
118
+ * Converts the UI card shell style into the canonical snapshot visual config.
119
+ * @param config - Card shell style selected in the workbench settings panel.
120
+ * @returns Snapshot visualConfig payload for layout persistence.
121
+ */
122
+ export declare function cardStyleConfigToSnapshotVisualConfig(config: WorkbenchCardStyleConfig): WorkbenchSnapshot['visualConfig'];
123
+ /**
124
+ * Converts a persisted snapshot visual config back into the UI card shell style.
125
+ * @param visualConfig - Snapshot visualConfig from the backend.
126
+ * @returns Normalized UI card style config.
127
+ */
128
+ export declare function cardStyleConfigFromSnapshotVisualConfig(visualConfig: WorkbenchSnapshot['visualConfig'] | null | undefined): WorkbenchCardStyleConfig;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @fileoverview 对话屏幕上下文构建工具 - 汇总画布、会话、产物索引与最近焦点信息。
3
+ * @author seadon
4
+ * @created 2026-05-21
5
+ */
6
+ import type { ConversationScreenContext, ConversationTurn, RoleId, WorkbenchSnapshot } from '@fses/workbench-app/types';
7
+ export interface SelectedNestedBlockTarget {
8
+ parentId: string;
9
+ childId: string;
10
+ }
11
+ type ConversationScreenContextBaseParams = {
12
+ currentConversationId: string;
13
+ activeTurnId?: string | null;
14
+ activeWorkItemId?: string | null;
15
+ turns: ConversationTurn[];
16
+ snapshot: WorkbenchSnapshot | null;
17
+ selectedBlockId?: string | null;
18
+ selectedNestedBlock?: SelectedNestedBlockTarget | null;
19
+ input: string;
20
+ workspaceId: string;
21
+ userId: string;
22
+ recentFocusPatch?: Partial<ConversationScreenContext['recentFocus']>;
23
+ };
24
+ type ConversationScreenContextWithRoleParams = ConversationScreenContextBaseParams & {
25
+ roleId: RoleId | '';
26
+ };
27
+ type ConversationScreenContextWithoutRole = Omit<ConversationScreenContext, 'roleId'>;
28
+ export declare function buildConversationScreenContext(params: ConversationScreenContextWithRoleParams): ConversationScreenContext;
29
+ export declare function buildConversationScreenContext(params: ConversationScreenContextBaseParams): ConversationScreenContextWithoutRole;
30
+ export {};
@@ -0,0 +1,133 @@
1
+ import { type RuntimeIdentityContext } from './runtimeIdentity';
2
+ export type DeepAgentClientContext = RuntimeIdentityContext;
3
+ export interface DeepAgentRunMessagePayload {
4
+ content: string;
5
+ metadata?: Record<string, unknown>;
6
+ }
7
+ export interface CreateDeepAgentRunPayload {
8
+ workbenchId: string;
9
+ resource_id?: string;
10
+ businessGroupId?: string;
11
+ message: DeepAgentRunMessagePayload;
12
+ clientContext?: {
13
+ cardAction?: Record<string, unknown>;
14
+ selectedCardId?: string;
15
+ viewState?: Record<string, unknown>;
16
+ };
17
+ }
18
+ export interface DeepAgentRunView {
19
+ runId: string;
20
+ threadId: string;
21
+ status: string;
22
+ eventsUrl?: string;
23
+ currentInterrupt?: unknown;
24
+ error?: unknown;
25
+ }
26
+ export interface ListDeepAgentMessagesQuery {
27
+ cursor?: string;
28
+ limit?: number;
29
+ order?: 'asc' | 'desc';
30
+ }
31
+ export interface ResumeDeepAgentRunPayload {
32
+ interruptId: string;
33
+ decision: unknown;
34
+ }
35
+ export interface CancelDeepAgentRunPayload {
36
+ reason?: string;
37
+ }
38
+ export interface ArchiveDeepAgentRunPayload {
39
+ reason?: string;
40
+ }
41
+ export interface DeepAgentRunEventMeta {
42
+ id: string;
43
+ }
44
+ /**
45
+ * 判断后端错误是否为同一 thread 已有 active run 的稳定冲突。
46
+ * @param error - 平台请求层抛出的任意错误
47
+ * @returns true 表示前端应展示等待当前任务完成的业务提示
48
+ */
49
+ export declare function isDeepAgentActiveRunConflict(error: unknown): boolean;
50
+ /**
51
+ * 首次创建 DeepAgent run。
52
+ * @param context - 运行态身份上下文
53
+ * @param payload - 用户输入和 UI 上下文
54
+ * @returns run 视图
55
+ */
56
+ export declare function createDeepAgentRun(context: DeepAgentClientContext, payload: CreateDeepAgentRunPayload): Promise<DeepAgentRunView>;
57
+ /**
58
+ * 在已有 thread 下创建后续 run。
59
+ * @param context - 运行态身份上下文
60
+ * @param threadId - DeepAgent thread id
61
+ * @param payload - 用户输入和 UI 上下文
62
+ * @returns run 视图
63
+ */
64
+ export declare function createDeepAgentThreadRun(context: DeepAgentClientContext, threadId: string, payload: CreateDeepAgentRunPayload): Promise<DeepAgentRunView>;
65
+ /**
66
+ * 查询 run 视图。
67
+ * @param context - 运行态身份上下文
68
+ * @param threadId - DeepAgent thread id
69
+ * @param runId - DeepAgent run id
70
+ * @returns run 视图
71
+ */
72
+ export declare function getDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string): Promise<DeepAgentRunView>;
73
+ /**
74
+ * 查询 thread 消息。
75
+ * @param context - 运行态身份上下文
76
+ * @param threadId - DeepAgent thread id
77
+ * @param query - 分页参数
78
+ * @returns messages page
79
+ */
80
+ export declare function listDeepAgentMessages(context: DeepAgentClientContext, threadId: string, query?: ListDeepAgentMessagesQuery): Promise<unknown>;
81
+ /**
82
+ * 提交 run resume 决策。
83
+ * @param context - 运行态身份上下文
84
+ * @param threadId - DeepAgent thread id
85
+ * @param runId - DeepAgent run id
86
+ * @param payload - resume payload
87
+ * @returns resume 结果
88
+ */
89
+ export declare function resumeDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload: ResumeDeepAgentRunPayload): Promise<unknown>;
90
+ /**
91
+ * 取消 run。
92
+ * @param context - 运行态身份上下文
93
+ * @param threadId - DeepAgent thread id
94
+ * @param runId - DeepAgent run id
95
+ * @param payload - cancel payload
96
+ * @returns cancel 结果
97
+ */
98
+ export declare function cancelDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: CancelDeepAgentRunPayload): Promise<unknown>;
99
+ /**
100
+ * 存档 run。
101
+ * @param context - 运行态身份上下文
102
+ * @param threadId - DeepAgent thread id
103
+ * @param runId - DeepAgent run id
104
+ * @param payload - archive payload
105
+ * @returns archive 结果
106
+ */
107
+ export declare function archiveDeepAgentRun(context: DeepAgentClientContext, threadId: string, runId: string, payload?: ArchiveDeepAgentRunPayload): Promise<unknown>;
108
+ /**
109
+ * 打开 run events SSE。
110
+ * @param context - 运行态身份上下文
111
+ * @param threadId - DeepAgent thread id
112
+ * @param runId - DeepAgent run id
113
+ * @param handlers - event callbacks
114
+ * @param options - abort and resume options
115
+ * @returns fetch-event-source promise
116
+ */
117
+ export declare function openDeepAgentRunEvents(context: DeepAgentClientContext, threadId: string, runId: string, handlers: {
118
+ onEvent: (event: unknown, meta: DeepAgentRunEventMeta) => void;
119
+ onError?: (error: Error) => void;
120
+ onOpen?: () => void;
121
+ }, options?: {
122
+ signal?: AbortSignal;
123
+ lastEventId?: string;
124
+ eventsUrl?: string;
125
+ }): Promise<void>;
126
+ /**
127
+ * 解析后端返回的 DeepAgent events URL 为 gateway URL。
128
+ * @param threadId - DeepAgent thread id
129
+ * @param runId - DeepAgent run id
130
+ * @param eventsUrl - 后端返回的相对 URL
131
+ * @returns gateway 下的 events URL
132
+ */
133
+ export declare function resolveDeepAgentEventsUrl(threadId: string, runId: string, eventsUrl?: string): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview 兼容转发 - Deep Agent 过程分组已迁移到 @fses/workbench-app。
3
+ * @author seadon
4
+ * @created 2026-08-12
5
+ */
6
+ export * from '../../../runtime/deep-agent/deepAgentProcessGroups';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview 兼容转发 - Deep Agent 进度消息已迁移到 @fses/workbench-app。
3
+ * @author seadon
4
+ * @created 2026-08-12
5
+ */
6
+ export * from '../../../runtime/deep-agent/deepAgentProgressMessage';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview 兼容转发 - Deep Agent 工具展示名已迁移到 @fses/workbench-app。
3
+ * @author seadon
4
+ * @created 2026-08-12
5
+ */
6
+ export * from '../../../runtime/deep-agent/deepAgentToolDisplayName';
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @fileoverview DeepAgent 工作台卡片 mutation 投影器 - 校验组合结果中的可应用快照与结构化反馈
3
+ * @author seadon
4
+ * @created 2026-08-02
5
+ */
6
+ import type { ConversationConfirmation } from '@fses/workbench-app/types';
7
+ export interface ProjectedWorkbenchCardMutation {
8
+ kind: 'workbench_card_mutation';
9
+ status: 'applied';
10
+ publicPayload: {
11
+ changedBlockIds?: string[];
12
+ insertedBlockIds?: string[];
13
+ message?: string;
14
+ snapshot: Record<string, unknown> & {
15
+ blocks: unknown[];
16
+ };
17
+ };
18
+ }
19
+ export type WorkbenchCardMutationFeedbackSeverity = 'info' | 'warning' | 'error' | 'confirmation';
20
+ export type CombinedMutationFeedbackStatus = 'not_attempted' | 'needs_confirmation' | 'requires_query' | 'version_conflict' | 'blocked' | 'failed';
21
+ export interface ProjectedWorkbenchCardMutationFeedback {
22
+ status: CombinedMutationFeedbackStatus;
23
+ severity: WorkbenchCardMutationFeedbackSeverity;
24
+ message: string;
25
+ errorCode?: string;
26
+ confirmation?: ConversationConfirmation;
27
+ }
28
+ /**
29
+ * Projects a standalone or combined DeepAgent card mutation only when it is applied and has a valid snapshot.
30
+ * @param value - Tool public payload.
31
+ * @returns Normalized applied mutation, or null for non-applicable states.
32
+ */
33
+ export declare function projectDeepAgentWorkbenchCardMutationPayload(value: unknown): ProjectedWorkbenchCardMutation | null;
34
+ /**
35
+ * Projects non-applied feedback from a combined recommend-and-insert result.
36
+ * @param value - Tool public payload.
37
+ * @returns Structured feedback, or null when success/another operation owns the result.
38
+ */
39
+ export declare function projectDeepAgentWorkbenchCardMutationFeedback(value: unknown): ProjectedWorkbenchCardMutationFeedback | null;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * @fileoverview DeepAgent workbench card recommendation adapter - converts tool payloads into chat UI events.
3
+ * @author seadon
4
+ * @created 2026-07-02
5
+ */
6
+ import type { WorkbenchPlanStreamEvent } from '@fses/workbench-app/types';
7
+ import { recommendationResultIdentity } from '@workbench-internal/lib/workbenchCardRecommendationBinding';
8
+ type CardRecommendationsReadyEvent = Extract<WorkbenchPlanStreamEvent, {
9
+ type: 'card_recommendations_ready';
10
+ }> & {
11
+ conversationId?: string;
12
+ placementTurnId?: string;
13
+ recommendationOrigin?: 'deep_agent_transcript';
14
+ source?: 'sql' | 'metric' | 'mixed';
15
+ sourceTurnId?: string;
16
+ exhausted?: boolean;
17
+ totalRecommendationCount?: number;
18
+ eligibleCandidateCount?: number;
19
+ returnedCandidateCount?: number;
20
+ readyCandidateCount?: number;
21
+ diagnosticCandidateCount?: number;
22
+ chartFamilyCoverage?: string[];
23
+ projectionFamilyCoverage?: Record<string, string[]>;
24
+ queryResult?: Record<string, unknown>;
25
+ echartsCoverage?: Record<string, unknown>;
26
+ registryCoverage?: Record<string, unknown>;
27
+ };
28
+ type RegisteredCardInsertReadyEvent = Extract<WorkbenchPlanStreamEvent, {
29
+ type: 'registered_card_insert_ready';
30
+ }> & {
31
+ conversationId?: string;
32
+ message?: string;
33
+ source?: 'sql' | 'metric' | 'mixed';
34
+ cardConfig?: Record<string, unknown>;
35
+ selectedConfig?: Record<string, unknown>;
36
+ };
37
+ type RecommendationResultIdentity = ReturnType<typeof recommendationResultIdentity>;
38
+ /**
39
+ * Reads query-result identities carried by a DeepAgent workbench-card recommendation payload.
40
+ * @param value - Candidate DeepAgent tool payload.
41
+ * @returns Comparable query-result identities from shared and item-level query results.
42
+ */
43
+ export declare function deepAgentWorkbenchCardRecommendationQueryResultIdentities(value: unknown): RecommendationResultIdentity[];
44
+ /**
45
+ * Converts a DeepAgent workbench-card recommendation payload into the event already handled by the workbench chat bridge.
46
+ * @param input - DeepAgent payload and local turn binding.
47
+ * @returns Frontend recommendation event, or null for non-recommendation payloads.
48
+ */
49
+ export declare function buildDeepAgentWorkbenchCardRecommendationEvent(input: {
50
+ payload: unknown;
51
+ turnId: string;
52
+ conversationId?: string;
53
+ recommendationOrigin?: 'deep_agent_transcript';
54
+ sourceTurnId?: string;
55
+ }): CardRecommendationsReadyEvent | null;
56
+ /**
57
+ * Converts a DeepAgent workbench-card direct insert payload into the insert-ready event consumed by ai-chat.
58
+ * @param input - DeepAgent payload and local turn binding.
59
+ * @returns Registered-card insert event, or null when no direct insert is present.
60
+ */
61
+ export declare function buildDeepAgentWorkbenchCardDirectInsertEvent(input: {
62
+ payload: unknown;
63
+ turnId: string;
64
+ conversationId?: string;
65
+ }): RegisteredCardInsertReadyEvent | null;
66
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { EChartsOption } from 'echarts';
2
+ export interface DynamicEchartRowsPayload {
3
+ rows: Array<Record<string, unknown>>;
4
+ fieldMapping: {
5
+ xField?: unknown;
6
+ yFields?: unknown;
7
+ };
8
+ }
9
+ export interface DynamicEchartFieldMapping {
10
+ xField?: string;
11
+ yFields: string[];
12
+ }
13
+ export declare function normalizeDynamicEchartFieldMapping(fieldMapping: unknown): DynamicEchartFieldMapping;
14
+ export declare function buildDynamicEchartOption(optionTemplate: unknown, payload: DynamicEchartRowsPayload): EChartsOption;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @fileoverview ECharts option 编辑桥接 - 在用户侧标准 option 与内部 protocolRender 数据之间转换。
3
+ * @author seadon
4
+ * @created 2026-06-22
5
+ */
6
+ type JsonRecord = Record<string, unknown>;
7
+ type EChartsOptionDraftResult = {
8
+ ok: true;
9
+ option: JsonRecord;
10
+ } | {
11
+ ok: false;
12
+ reason: string;
13
+ };
14
+ /**
15
+ * 判断 card.data 是否为 ECharts protocolRender 数据。
16
+ * @param value - 候选 card.data。
17
+ * @returns 是 ECharts 协议卡数据时返回 true。
18
+ */
19
+ export declare function isEChartsProtocolRenderCardData(value: unknown): value is JsonRecord;
20
+ /**
21
+ * 从 protocolRender card.data 构造用户可编辑的标准 ECharts option。
22
+ * @param cardData - 当前卡片 card.data。
23
+ * @returns 转换结果;非协议卡或转换失败时返回失败原因。
24
+ */
25
+ export declare function buildEChartsOptionEditorDraft(cardData: unknown): EChartsOptionDraftResult;
26
+ /**
27
+ * 将用户编辑的标准 ECharts option 写回 protocolRender card.data。
28
+ * @param cardData - 当前卡片 card.data。
29
+ * @param option - 用户编辑后的 ECharts option。
30
+ * @returns 保留协议壳和模板信息的下一份 card.data。
31
+ * @throws 当 card.data 或 option 不符合预期时抛错。
32
+ */
33
+ export declare function applyEChartsOptionEditorDraft(cardData: unknown, option: unknown): JsonRecord;
34
+ export {};
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @fileoverview ECharts 协议数据精简 - 移除运行态交互不需要的生成期元数据。
3
+ * @author seadon
4
+ * @created 2026-06-22
5
+ */
6
+ import type { MaterializedBlock, WorkbenchSnapshot } from '@fses/workbench-app/types';
7
+ /**
8
+ * 精简工作台快照中的 ECharts protocolRender 卡片数据。
9
+ * @param snapshot - 候选快照。
10
+ * @returns 精简后的快照;无变化时返回原快照。
11
+ */
12
+ export declare function slimEChartsProtocolSnapshot(snapshot: WorkbenchSnapshot): WorkbenchSnapshot;
13
+ /**
14
+ * 精简单张工作台卡片中的 ECharts protocolRender 数据。
15
+ * @param block - 候选卡片。
16
+ * @returns 精简后的卡片;无变化时返回原卡片。
17
+ */
18
+ export declare function slimEChartsProtocolBlock(block: MaterializedBlock): MaterializedBlock;
19
+ /**
20
+ * 精简 ECharts protocolRender 卡片数据。
21
+ * @param value - 候选卡片数据。
22
+ * @returns 精简后的数据;非 ECharts protocolRender 数据原样返回。
23
+ */
24
+ export declare function slimEChartsProtocolCardData(value: Record<string, unknown>): Record<string, unknown>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * @fileoverview ECharts 模板资源工具 - 读取模板部署 manifest、config 和 data 资源。
3
+ * @author seadon
4
+ * @created 2026-06-22
5
+ */
6
+ import type { EChartsTemplateDeployManifestEntry } from '@fses/workbench-app/types';
7
+ import type { ProtocolConfigPayload, ProtocolDataPayload } from '@fses/workbench-app/types';
8
+ export interface EChartsTemplateDeployManifest {
9
+ version: 1;
10
+ entries: EChartsTemplateDeployManifestEntry[];
11
+ }
12
+ /**
13
+ * 根据 exampleId 查找模板部署资源。
14
+ * @param manifest - 部署 manifest。
15
+ * @param exampleId - 官方示例 ID。
16
+ * @returns manifest 条目。
17
+ */
18
+ export declare function echartsTemplateDeployEntry(manifest: EChartsTemplateDeployManifest | null | undefined, exampleId: string): EChartsTemplateDeployManifestEntry | undefined;
19
+ /**
20
+ * 加载 ECharts 模板 JSON 资源。
21
+ * @param publicPath - public 下可访问的 JSON 路径。
22
+ * @returns JSON 资源内容。
23
+ */
24
+ export declare function loadEChartsTemplateJson<T extends ProtocolConfigPayload | ProtocolDataPayload>(publicPath: string): Promise<T>;