@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,1091 @@
1
+ import { toRefs as Ie, shallowReadonly as V, inject as Ee, defineComponent as D, provide as Pe, openBlock as _, createElementBlock as v, renderSlot as A, createElementVNode as u, normalizeClass as j, normalizeStyle as q, withModifiers as Se, createCommentVNode as B, createVNode as de, Transition as Ae, withCtx as W, computed as Q, createBlock as ce, defineAsyncComponent as Re, unref as Te, ref as K, watch as We, onBeforeUnmount as Be, toDisplayString as P } from "vue";
2
+ import { c as Me, b as Ne } from "./useWorkbenchRuntime-Pekhufen.js";
3
+ const le = Symbol("workbench-app-context");
4
+ function Oe(e) {
5
+ const { adapters: r, config: t, extensions: n } = Ie(e);
6
+ return {
7
+ adapters: V(r),
8
+ config: V(t),
9
+ extensions: V(n)
10
+ };
11
+ }
12
+ function qr() {
13
+ const e = Ee(le);
14
+ if (!e)
15
+ throw new Error("useWorkbenchAppContext must be used inside WorkbenchWorkspaceCore");
16
+ return e;
17
+ }
18
+ const $e = { class: "fses-workbench-app" }, De = /* @__PURE__ */ D({
19
+ __name: "WorkbenchWorkspaceCore",
20
+ props: {
21
+ adapters: {},
22
+ config: {},
23
+ extensions: {}
24
+ },
25
+ setup(e) {
26
+ return Pe(le, Oe(e)), (t, n) => (_(), v("div", $e, [
27
+ A(t.$slots, "default")
28
+ ]));
29
+ }
30
+ }), He = { class: "workbench-shell" }, Ue = ["aria-hidden", "inert"], Fe = { class: "workbench-studio-panel__body" }, ne = 48, Le = /* @__PURE__ */ D({
31
+ __name: "WorkbenchShell",
32
+ props: {
33
+ studioPanelWidth: {},
34
+ studioPanelCollapsed: { type: Boolean },
35
+ studioPanelEnabled: { type: Boolean },
36
+ drawerOpen: { type: Boolean },
37
+ drawerWidth: {},
38
+ dragging: { type: Boolean },
39
+ canvasFocusMode: { type: Boolean },
40
+ imageWorkbench: { type: Boolean }
41
+ },
42
+ emits: ["startDrag"],
43
+ setup(e, { emit: r }) {
44
+ const t = r;
45
+ return (n, o) => (_(), v("div", He, [
46
+ u("div", {
47
+ class: j(["workbench-shell__body", { "workbench-shell__body--dragging": e.dragging }])
48
+ }, [
49
+ u("div", {
50
+ class: "workbench-shell__canvas-pane",
51
+ style: q({
52
+ flexBasis: e.drawerOpen ? `calc(100% - ${e.drawerWidth || 392}px)` : e.canvasFocusMode || !e.studioPanelEnabled ? "100%" : e.studioPanelCollapsed ? `calc(100% - ${ne}px)` : `calc(100% - ${e.studioPanelWidth}px - 8px)`
53
+ })
54
+ }, [
55
+ A(n.$slots, "left", {}, void 0, !0)
56
+ ], 4),
57
+ e.studioPanelEnabled && !e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (_(), v("div", {
58
+ key: 0,
59
+ "aria-orientation": "vertical",
60
+ "aria-label": "调整问数栏宽度",
61
+ class: "workbench-splitter",
62
+ role: "separator",
63
+ onPointerdown: o[0] || (o[0] = (l) => t("startDrag", l)),
64
+ onDragstart: o[1] || (o[1] = Se(() => {
65
+ }, ["prevent"]))
66
+ }, [...o[2] || (o[2] = [
67
+ u("div", { class: "workbench-splitter__track" }, null, -1)
68
+ ])], 32)) : B("", !0),
69
+ e.studioPanelEnabled && !e.canvasFocusMode && !e.drawerOpen ? (_(), v("div", {
70
+ key: 1,
71
+ class: j(["workbench-studio-panel", { "workbench-studio-panel--collapsed": e.studioPanelCollapsed }]),
72
+ style: q({ flexBasis: e.studioPanelCollapsed ? "0px" : `${e.studioPanelWidth}px` }),
73
+ "aria-hidden": e.studioPanelCollapsed ? "true" : void 0,
74
+ inert: e.studioPanelCollapsed ? !0 : void 0
75
+ }, [
76
+ u("div", Fe, [
77
+ A(n.$slots, "right", {}, void 0, !0)
78
+ ])
79
+ ], 14, Ue)) : B("", !0),
80
+ de(Ae, { name: "workbench-assistant-rail-shell" }, {
81
+ default: W(() => [
82
+ e.studioPanelEnabled && e.studioPanelCollapsed && !e.canvasFocusMode && !e.drawerOpen ? (_(), v("div", {
83
+ key: 0,
84
+ class: "workbench-assistant-rail-shell",
85
+ style: q({ flexBasis: `${ne}px` }),
86
+ "aria-label": "收起状态问数助手入口"
87
+ }, [
88
+ A(n.$slots, "collapsed-right", {}, void 0, !0)
89
+ ], 4)) : B("", !0)
90
+ ]),
91
+ _: 3
92
+ }),
93
+ e.drawerOpen ? (_(), v("div", {
94
+ key: 2,
95
+ class: "workbench-shell__drawer",
96
+ style: q({ flexBasis: `${e.drawerWidth || 392}px` })
97
+ }, [
98
+ A(n.$slots, "drawer", {}, void 0, !0)
99
+ ], 4)) : B("", !0)
100
+ ], 2)
101
+ ]));
102
+ }
103
+ }), xe = (e, r) => {
104
+ const t = e.__vccOpts || e;
105
+ for (const [n, o] of r)
106
+ t[n] = o;
107
+ return t;
108
+ }, qe = /* @__PURE__ */ xe(Le, [["__scopeId", "data-v-ed22309e"]]), Kr = /* @__PURE__ */ D({
109
+ __name: "WorkbenchAppHost",
110
+ props: {
111
+ adapters: {},
112
+ config: {},
113
+ extensions: {},
114
+ runtime: {}
115
+ },
116
+ setup(e) {
117
+ const r = e, t = Q(() => ({
118
+ canvasFocusMode: r.runtime.canvasFocusMode ?? !1,
119
+ drawerOpen: r.runtime.drawerOpen ?? !1,
120
+ drawerWidth: r.runtime.drawerWidth,
121
+ dragging: r.runtime.dragging ?? !1,
122
+ imageWorkbench: r.runtime.imageWorkbench ?? !1,
123
+ studioPanelCollapsed: r.runtime.studioPanelCollapsed ?? !1,
124
+ studioPanelEnabled: r.runtime.studioPanelEnabled ?? !0,
125
+ studioPanelWidth: r.runtime.studioPanelWidth ?? 420
126
+ }));
127
+ return (n, o) => (_(), ce(De, {
128
+ adapters: r.adapters,
129
+ config: r.config,
130
+ extensions: r.extensions
131
+ }, {
132
+ default: W(() => [
133
+ de(qe, {
134
+ "canvas-focus-mode": t.value.canvasFocusMode,
135
+ "drawer-open": t.value.drawerOpen,
136
+ "drawer-width": t.value.drawerWidth,
137
+ dragging: t.value.dragging,
138
+ "image-workbench": t.value.imageWorkbench,
139
+ "studio-panel-collapsed": t.value.studioPanelCollapsed,
140
+ "studio-panel-enabled": t.value.studioPanelEnabled,
141
+ "studio-panel-width": t.value.studioPanelWidth,
142
+ onStartDrag: o[0] || (o[0] = (l) => {
143
+ var p, s;
144
+ return (s = (p = r.runtime).startStudioPanelDrag) == null ? void 0 : s.call(p, l);
145
+ })
146
+ }, {
147
+ left: W(() => [
148
+ A(n.$slots, "left")
149
+ ]),
150
+ right: W(() => [
151
+ A(n.$slots, "right")
152
+ ]),
153
+ "collapsed-right": W(() => [
154
+ A(n.$slots, "collapsed-right")
155
+ ]),
156
+ drawer: W(() => [
157
+ A(n.$slots, "drawer")
158
+ ]),
159
+ _: 3
160
+ }, 8, ["canvas-focus-mode", "drawer-open", "drawer-width", "dragging", "image-workbench", "studio-panel-collapsed", "studio-panel-enabled", "studio-panel-width"])
161
+ ]),
162
+ _: 3
163
+ }, 8, ["adapters", "config", "extensions"]));
164
+ }
165
+ });
166
+ let Z = {}, ue = {}, me = {};
167
+ function Ke(e) {
168
+ Z = e;
169
+ }
170
+ function je(e, r, t) {
171
+ ue = e, me = r, Ke(t);
172
+ }
173
+ function jr() {
174
+ return ue;
175
+ }
176
+ function zr() {
177
+ return me;
178
+ }
179
+ function Vr() {
180
+ return Z;
181
+ }
182
+ function Qr() {
183
+ var e;
184
+ return (e = Z.fde) == null ? void 0 : e.generatedTemplateShell;
185
+ }
186
+ const Gr = /* @__PURE__ */ D({
187
+ __name: "WorkbenchApplication",
188
+ props: {
189
+ adapters: {},
190
+ config: {},
191
+ embedInPortal: { type: Boolean, default: !1 },
192
+ extensions: {}
193
+ },
194
+ setup(e) {
195
+ const r = e;
196
+ je(r.adapters, r.config, r.extensions);
197
+ const t = Re(() => import("./Workspace-DP3xr4Jp.js"));
198
+ return (n, o) => (_(), ce(Te(t), {
199
+ "embed-in-portal": r.embedInPortal
200
+ }, null, 8, ["embed-in-portal"]));
201
+ }
202
+ });
203
+ function Yr(e) {
204
+ return {
205
+ getItem: (r) => e.getItem(r),
206
+ removeItem: (r) => e.removeItem(r),
207
+ setItem: (r, t) => e.setItem(r, t)
208
+ };
209
+ }
210
+ const ze = {
211
+ resolveAssetUrl: (e) => e
212
+ }, O = {
213
+ debug: (e, r) => console.debug(e, r),
214
+ error: (e, r) => console.error(e, r),
215
+ info: (e, r) => console.info(e, r),
216
+ warn: (e, r) => console.warn(e, r)
217
+ }, Ve = {
218
+ error: (e) => O.error(e),
219
+ info: (e) => O.info(e),
220
+ success: (e) => O.info(e),
221
+ warning: (e) => O.warn(e)
222
+ };
223
+ function Jr(e = {}) {
224
+ const r = /* @__PURE__ */ new Map();
225
+ return {
226
+ agentTransportAdapter: {
227
+ openEventStream: async () => {
228
+ },
229
+ requestJson: async () => ({})
230
+ },
231
+ assetAdapter: ze,
232
+ identityAdapter: {
233
+ readIdentity: () => ({ appId: "test-app", roleId: "default", tenantId: "test-tenant", userId: "test-user" })
234
+ },
235
+ loggerAdapter: O,
236
+ messageAdapter: Ve,
237
+ platformRequestAdapter: {
238
+ ensureSessionReady: async () => !0,
239
+ requestJson: async () => ({})
240
+ },
241
+ routerAdapter: {
242
+ push: () => {
243
+ },
244
+ readQuery: () => ({}),
245
+ replaceQuery: () => {
246
+ }
247
+ },
248
+ storageAdapter: {
249
+ getItem: (t) => r.get(t) ?? null,
250
+ removeItem: (t) => {
251
+ r.delete(t);
252
+ },
253
+ setItem: (t, n) => {
254
+ r.set(t, n);
255
+ }
256
+ },
257
+ uploadAdapter: {
258
+ uploadFile: async () => ({})
259
+ },
260
+ ...e
261
+ };
262
+ }
263
+ const Qe = [
264
+ "attachments",
265
+ "cards",
266
+ "cardRecommendationDraft",
267
+ "defaultExpanded",
268
+ "detail",
269
+ "error",
270
+ "initialEventsPending",
271
+ "markThinking",
272
+ "memoryCaptureDraft",
273
+ "planDraft",
274
+ "processInvocations",
275
+ "processPreamble",
276
+ "queryResultTable",
277
+ "queryResultTables",
278
+ "registeredCardInsertDraft",
279
+ "removeThinking",
280
+ "taskStateDraft",
281
+ "thinkingProcess",
282
+ "thinkingProcessMessages",
283
+ "workbenchTurnId"
284
+ ];
285
+ function Xr(e, r) {
286
+ for (const t of Qe)
287
+ e[t] = r[t];
288
+ }
289
+ function Ge(e) {
290
+ const r = e.cardRecommendationDraft;
291
+ if (!r || typeof r != "object") return "";
292
+ const t = r.sourceTurnId;
293
+ return typeof t == "string" && t.trim() ? t.trim() : "";
294
+ }
295
+ function Ye(e) {
296
+ const r = e.cardRecommendationDraft;
297
+ if (!r || typeof r != "object") return "";
298
+ const t = r.placementTurnId;
299
+ return typeof t == "string" && t.trim() ? t.trim() : "";
300
+ }
301
+ function fe(e) {
302
+ const r = e.workbenchTurnId;
303
+ return typeof r == "string" && r.trim() ? r.trim() : "";
304
+ }
305
+ function he(e) {
306
+ if (typeof e != "string" || !e.startsWith("workbench-turn-")) return "";
307
+ const r = ["-reply", "-conclusion-stream", "-item-", "-process-", "-task-", "-card-mutation-confirmation"];
308
+ for (const t of r) {
309
+ const n = e.indexOf(t, 15);
310
+ if (n > 15) return e.slice(15, n);
311
+ }
312
+ return "";
313
+ }
314
+ function G(e, r) {
315
+ var n;
316
+ if (e.role !== "assistant" || !((n = e.content) != null && n.trim())) return !1;
317
+ const t = fe(e);
318
+ return t ? t === r : he(e.id) !== r ? !1 : typeof e.id == "string" && (e.id.endsWith("-reply") || e.id.endsWith("-conclusion-stream"));
319
+ }
320
+ function ae(e, r) {
321
+ return !!(r && e.some((t) => G(t, r)));
322
+ }
323
+ function Je(e, r) {
324
+ const t = Ge(r), n = Ye(r);
325
+ return ae(e, t) ? t : ae(e, n) ? n : n || fe(r) || t || he(r.id);
326
+ }
327
+ function Zr(e) {
328
+ for (const r of e.appendedMessages.values()) {
329
+ if (!r.cardRecommendationDraft) continue;
330
+ const t = Je(e.messages, r);
331
+ if (!t) continue;
332
+ const n = e.messages.indexOf(r);
333
+ if (n < 0) continue;
334
+ const o = e.messages.findIndex((s) => G(s, t));
335
+ if (o < 0 || n === o + 1) continue;
336
+ const [l] = e.messages.splice(n, 1), p = e.messages.findIndex((s) => G(s, t));
337
+ if (p < 0) {
338
+ e.messages.splice(n, 0, l);
339
+ continue;
340
+ }
341
+ e.messages.splice(p + 1, 0, l);
342
+ }
343
+ }
344
+ function Xe(e) {
345
+ return !e.thinkingProcess;
346
+ }
347
+ function Ze(e) {
348
+ const r = e.content.trim();
349
+ return Xe(e) ? `${r.replace(/完成(?:,用时 .*)?$/u, "").trim()}完成` : r;
350
+ }
351
+ function et(e, r) {
352
+ return {
353
+ content: Ze(e),
354
+ loading: !1,
355
+ ...typeof e.startTime == "number" ? { startTime: e.startTime } : {},
356
+ ...typeof e.endTime == "number" ? { endTime: e.endTime } : typeof r == "number" ? { endTime: r } : {}
357
+ };
358
+ }
359
+ function S(e) {
360
+ return e && typeof e == "object" && !Array.isArray(e) ? e : {};
361
+ }
362
+ function c(e) {
363
+ return typeof e == "string" ? e.trim() : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
364
+ }
365
+ function oe(e) {
366
+ return Array.isArray(e) ? String(e.length) : "";
367
+ }
368
+ function pe(e) {
369
+ const r = S(e);
370
+ return [
371
+ c(r.bindingId),
372
+ c(r.id),
373
+ c(r.metricId),
374
+ c(r.metricCode),
375
+ c(r.source),
376
+ c(r.bindingKind),
377
+ c(r.serviceOperation),
378
+ c(r.refreshApi),
379
+ c(r.contractHash)
380
+ ].join("|");
381
+ }
382
+ function ye(e) {
383
+ const r = S(e), t = S(r.data);
384
+ return [
385
+ c(r.resultId),
386
+ c(r.sourceTurnId),
387
+ c(r.rowCount),
388
+ oe(r.rows || t.rows),
389
+ oe(r.columns || t.columns),
390
+ pe(r.dataBinding || t.dataBinding)
391
+ ].join("|");
392
+ }
393
+ function er(e) {
394
+ const r = S(e), t = S(r.blockPlan), n = S(t.data), o = S(t.meta), l = S(o.queryResult);
395
+ return [
396
+ c(r.recommendationId),
397
+ c(r.capabilityId),
398
+ c(r.title),
399
+ c(r.previewStatus),
400
+ c(r.nextAction),
401
+ c(r.dataShape),
402
+ c(t.id),
403
+ c(t.title),
404
+ pe(r.dataBinding || n.dataBinding),
405
+ ye(r.queryResult || l)
406
+ ].join(":");
407
+ }
408
+ function rt(e) {
409
+ const r = S(e), t = typeof r.type == "string" ? r.type : "";
410
+ if (t === "card_recommendations_ready") {
411
+ const n = Array.isArray(r.recommendations) ? r.recommendations : [];
412
+ return [
413
+ t,
414
+ c(r.sourceTurnId),
415
+ c(r.placementTurnId),
416
+ ye(r.queryResult),
417
+ n.map(er).join(",")
418
+ ].join(":");
419
+ }
420
+ if (t === "query_result_table_ready") {
421
+ const n = S(r.queryResult), o = Array.isArray(n.rows) ? n.rows.length : "", l = Array.isArray(n.columns) ? n.columns.length : "";
422
+ return `${t}:${o}:${l}:${n.rowCount ?? ""}`;
423
+ }
424
+ return t;
425
+ }
426
+ const rr = /* @__PURE__ */ new Set(["pending", "running"]), tr = "/data-binding-candidate/query", nr = "/workbench/v2/documents/", ar = "/data-bindings/";
427
+ function or(e) {
428
+ return typeof (e == null ? void 0 : e.refreshApi) == "string" ? e.refreshApi.trim() : "";
429
+ }
430
+ function sr(e) {
431
+ return e.includes(tr);
432
+ }
433
+ function ge(e) {
434
+ let r = e;
435
+ try {
436
+ r = new URL(e, "http://localhost").pathname;
437
+ } catch {
438
+ r = e;
439
+ }
440
+ return r.includes(nr) && r.includes(ar);
441
+ }
442
+ function Y(e) {
443
+ return !!(e && typeof e == "object" && !Array.isArray(e));
444
+ }
445
+ function k(e) {
446
+ if (!Y(e)) return !1;
447
+ const r = typeof e.source == "string" ? e.source.trim().toLowerCase() : "", t = typeof e.sourceType == "string" ? e.sourceType.trim().toLowerCase() : "", n = typeof e.composeSource == "string" ? e.composeSource.trim().toLowerCase() : "";
448
+ return r === "image" || t === "image" || n === "image" || k(e.params);
449
+ }
450
+ function $(e) {
451
+ return Y(e) ? k(e) || k(e.recognition) ? !0 : Y(e.v2) ? $(e.v2) : !1 : !1;
452
+ }
453
+ function ir(e, r, t) {
454
+ return (r == null ? void 0 : r.suppressImageComposeAutoRefresh) !== !0 || !ge(t) ? !1 : k(e == null ? void 0 : e.params) || k(e) || k(r) || k(r == null ? void 0 : r.source) || k(r == null ? void 0 : r.data) || $(r == null ? void 0 : r.recognition) || $(r == null ? void 0 : r.meta);
455
+ }
456
+ function dr(e, r) {
457
+ return k(e == null ? void 0 : e.params) || k(e) || k(r) || k(r == null ? void 0 : r.source) || k(r == null ? void 0 : r.data) || $(r == null ? void 0 : r.recognition) || $(r == null ? void 0 : r.meta);
458
+ }
459
+ function tt(e, r) {
460
+ if (!e) return !1;
461
+ const t = or(e);
462
+ if (!t || sr(t) || ir(e, r, t)) return !1;
463
+ const n = typeof (e == null ? void 0 : e.status) == "string" ? e.status.trim().toLowerCase() : "";
464
+ return !(rr.has(n) || ge(t) && dr(e, r));
465
+ }
466
+ function nt(e) {
467
+ var n;
468
+ const r = (n = e.title) == null ? void 0 : n.trim(), t = r ? cr(r) : void 0;
469
+ return t || `字段 ${e.index + 1}`;
470
+ }
471
+ function cr(e) {
472
+ const r = e.replace(/[A-Za-z0-9_./\\()[\]{}::,,;;#%+\-=]+/gu, "").replace(/\s+/gu, "").trim();
473
+ return r && /[\u3400-\u9fff]/u.test(r) ? r : void 0;
474
+ }
475
+ function J(e, r = {}, t = "-") {
476
+ return Number.isFinite(e) ? new Intl.NumberFormat("zh-CN", r).format(e) : t;
477
+ }
478
+ function at(e, r = "") {
479
+ return r === "percent" ? `${(e * 100).toFixed(1)}%` : r === "currency" ? Math.abs(e) >= 1e8 ? `¥${(e / 1e8).toFixed(2)}亿` : Math.abs(e) >= 1e4 ? `¥${(e / 1e4).toFixed(1)}万` : `¥${J(e)}` : J(e);
480
+ }
481
+ function ot(e, r = {}) {
482
+ return e === 0 ? "-" : J(e, r);
483
+ }
484
+ function se(e = {}) {
485
+ var t, n, o, l, p, s, C, R, H, U, F, L;
486
+ const r = {
487
+ workspaceId: g([
488
+ f((t = e.routeQuery) == null ? void 0 : t.workspaceId),
489
+ y(e.locationSearch, "workspaceId"),
490
+ b(e.locationHash, "workspaceId"),
491
+ w(e.locationPathname, "workspaceId")
492
+ ]),
493
+ userId: g([
494
+ f((n = e.routeQuery) == null ? void 0 : n.userId),
495
+ y(e.locationSearch, "userId"),
496
+ b(e.locationHash, "userId"),
497
+ w(e.locationPathname, "userId")
498
+ ]),
499
+ tenantId: ie(e, ["tenantId", "tenant_id", "tenant-id"]),
500
+ appId: ie(e, ["appId", "app_id", "app-id"]),
501
+ roleId: "",
502
+ mode: g([
503
+ f((o = e.routeQuery) == null ? void 0 : o.mode),
504
+ y(e.locationSearch, "mode"),
505
+ b(e.locationHash, "mode"),
506
+ w(e.locationPathname, "mode")
507
+ ]),
508
+ fdeMode: g([
509
+ f((l = e.routeQuery) == null ? void 0 : l.fdeMode),
510
+ y(e.locationSearch, "fdeMode"),
511
+ b(e.locationHash, "fdeMode"),
512
+ w(e.locationPathname, "fdeMode")
513
+ ]),
514
+ workbenchEditable: g([
515
+ f((p = e.routeQuery) == null ? void 0 : p.workbenchEditable),
516
+ y(e.locationSearch, "workbenchEditable"),
517
+ b(e.locationHash, "workbenchEditable"),
518
+ w(e.locationPathname, "workbenchEditable")
519
+ ]),
520
+ conversationId: g([
521
+ f((s = e.routeQuery) == null ? void 0 : s.conversationId),
522
+ y(e.locationSearch, "conversationId"),
523
+ b(e.locationHash, "conversationId"),
524
+ w(e.locationPathname, "conversationId")
525
+ ]),
526
+ resourceId: g([
527
+ f((C = e.routeQuery) == null ? void 0 : C.resourceId),
528
+ y(e.locationSearch, "resourceId"),
529
+ b(e.locationHash, "resourceId"),
530
+ w(e.locationPathname, "resourceId")
531
+ ]),
532
+ fdeResourceId: g([
533
+ f((R = e.routeQuery) == null ? void 0 : R.fdeResourceId),
534
+ y(e.locationSearch, "fdeResourceId"),
535
+ b(e.locationHash, "fdeResourceId"),
536
+ w(e.locationPathname, "fdeResourceId")
537
+ ]),
538
+ path: g([
539
+ f((H = e.routeQuery) == null ? void 0 : H.path),
540
+ y(e.locationSearch, "path"),
541
+ b(e.locationHash, "path"),
542
+ w(e.locationPathname, "path")
543
+ ]),
544
+ fdePath: g([
545
+ f((U = e.routeQuery) == null ? void 0 : U.fdePath),
546
+ y(e.locationSearch, "fdePath"),
547
+ b(e.locationHash, "fdePath"),
548
+ w(e.locationPathname, "fdePath")
549
+ ]),
550
+ name: g([
551
+ f((F = e.routeQuery) == null ? void 0 : F.name),
552
+ y(e.locationSearch, "name"),
553
+ b(e.locationHash, "name"),
554
+ w(e.locationPathname, "name")
555
+ ]),
556
+ fdeName: g([
557
+ f((L = e.routeQuery) == null ? void 0 : L.fdeName),
558
+ y(e.locationSearch, "fdeName"),
559
+ b(e.locationHash, "fdeName"),
560
+ w(e.locationPathname, "fdeName")
561
+ ])
562
+ };
563
+ return mr(r);
564
+ }
565
+ function st(e) {
566
+ if (typeof window > "u")
567
+ return se({ routeQuery: e });
568
+ const r = se({
569
+ routeQuery: e,
570
+ locationPathname: window.location.pathname,
571
+ locationSearch: window.location.search,
572
+ locationHash: window.location.hash
573
+ });
574
+ return {
575
+ ...r,
576
+ userId: r.userId || lr(window)
577
+ };
578
+ }
579
+ function f(e) {
580
+ return Array.isArray(e) ? f(e[0]) : typeof e == "string" ? e.trim() : "";
581
+ }
582
+ function y(e, r) {
583
+ var t;
584
+ return e && ((t = new URLSearchParams(e.startsWith("?") ? e.slice(1) : e).get(r)) == null ? void 0 : t.trim()) || "";
585
+ }
586
+ function b(e, r) {
587
+ if (!e) return "";
588
+ const t = e.indexOf("?");
589
+ if (t < 0) return "";
590
+ const n = e.indexOf("#", t + 1), o = n >= 0 ? e.slice(t + 1, n) : e.slice(t + 1);
591
+ return y(o, r);
592
+ }
593
+ function w(e, r) {
594
+ if (!e || !e.includes("=")) return "";
595
+ const t = e.split("/").filter(Boolean).find((n) => n.includes("="));
596
+ return t ? y(t, r) : "";
597
+ }
598
+ function ie(e, r) {
599
+ return g(r.flatMap((t) => {
600
+ var n;
601
+ return [
602
+ f((n = e.routeQuery) == null ? void 0 : n[t]),
603
+ y(e.locationSearch, t),
604
+ b(e.locationHash, t),
605
+ w(e.locationPathname, t)
606
+ ];
607
+ }));
608
+ }
609
+ function g(e) {
610
+ return e.find((r) => r.trim()) || "";
611
+ }
612
+ function lr(e) {
613
+ const r = [
614
+ e.__BT_WORKBENCH_USER__,
615
+ e.__BT_RUNTIME_IDENTITY__,
616
+ e.__BT_RUNTIME_CONTEXT__
617
+ ];
618
+ for (const t of r) {
619
+ const n = ur(t);
620
+ if (n) return n;
621
+ }
622
+ return "";
623
+ }
624
+ function ur(e) {
625
+ if (!e || typeof e != "object" || Array.isArray(e)) return "";
626
+ const r = e;
627
+ return g([
628
+ f(r.userId),
629
+ f(r.user_id),
630
+ f(r.egoUserinfo),
631
+ f(r.egoUserInfo),
632
+ f(r["ego-userinfo"])
633
+ ]);
634
+ }
635
+ function mr(e) {
636
+ if (!fr(e)) return e;
637
+ const r = e.fdeResourceId || e.resourceId;
638
+ return {
639
+ ...e,
640
+ workspaceId: e.workspaceId || r,
641
+ userId: e.userId || "fdeadmin",
642
+ roleId: e.roleId || "fde",
643
+ fdeResourceId: r
644
+ };
645
+ }
646
+ function fr(e) {
647
+ const r = e.mode.trim().toLowerCase(), t = e.fdeMode.trim().toLowerCase();
648
+ return r === "fde" || t === "true" || t === "1" || t === "yes";
649
+ }
650
+ const hr = "/workbench-card-previews/custom-cards";
651
+ function be(e) {
652
+ return `${e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "") || "system_card"}.png`;
653
+ }
654
+ function it(e) {
655
+ const r = Me(
656
+ {
657
+ capabilityId: e,
658
+ meta: {
659
+ id: `system-card-preview-${be(e).replace(/\.png$/u, "")}`,
660
+ systemCardPreview: !0
661
+ }
662
+ },
663
+ []
664
+ );
665
+ return r.status !== "success" || !r.block || !r.registryEntry ? null : {
666
+ ...r.block,
667
+ meta: {
668
+ ...r.block.meta,
669
+ rendererKey: r.registryEntry.rendererKey,
670
+ dataShape: r.registryEntry.dataShape
671
+ }
672
+ };
673
+ }
674
+ async function dt(e) {
675
+ const r = await Ne(
676
+ {
677
+ capabilityId: e,
678
+ meta: {
679
+ id: `system-card-preview-${be(e).replace(/\.png$/u, "")}`,
680
+ systemCardPreview: !0
681
+ }
682
+ },
683
+ []
684
+ );
685
+ return r.status !== "success" || !r.block || !r.registryEntry ? null : {
686
+ ...r.block,
687
+ meta: {
688
+ ...r.block.meta,
689
+ rendererKey: r.registryEntry.rendererKey,
690
+ dataShape: r.registryEntry.dataShape
691
+ }
692
+ };
693
+ }
694
+ function pr(e) {
695
+ const r = e.trim().replace(/^\/+/, "");
696
+ return `${hr}/${r}`;
697
+ }
698
+ const yr = pr("template_weather_card.png"), gr = "@byteluck-fe/workbench-template.WeatherCard", br = "card.fde.templateWeather", ct = [
699
+ {
700
+ capabilityId: br,
701
+ category: "card.fde_custom_cards",
702
+ type: "templateWeather",
703
+ title: "天气组件",
704
+ description: "@byteluck-fe/workbench-template 提供的天气组件,按城市展示实时天气。",
705
+ blockType: "display",
706
+ subType: "fdeCustom",
707
+ rendererKey: "fdeCustomComponent",
708
+ dataShape: "fdeCustomComponent",
709
+ shell: "card",
710
+ styleVariants: ["standard", "compact", "tile"],
711
+ defaultSize: "componentTall",
712
+ handlerClassName: "WorkbenchTemplateWeatherComponentAbility",
713
+ status: "implemented",
714
+ sourceLabel: "npm",
715
+ componentRef: gr,
716
+ packageName: "@byteluck-fe/workbench-template",
717
+ packageVersion: "0.1.1",
718
+ exportName: "WeatherCard",
719
+ previewUrl: yr,
720
+ defaultProps: { city: "上海" },
721
+ insertionMode: "registered"
722
+ }
723
+ ], wr = ["aria-busy"], _r = { class: "weather-card__header" }, kr = { class: "weather-card__heading" }, Cr = { class: "weather-card__city" }, vr = {
724
+ key: 0,
725
+ class: "weather-card__region"
726
+ }, Ir = {
727
+ key: 0,
728
+ class: "weather-card__state"
729
+ }, Er = {
730
+ key: 2,
731
+ class: "weather-card__body"
732
+ }, Pr = { class: "weather-card__temperature" }, Sr = { class: "weather-card__summary" }, Ar = { class: "weather-card__metrics" }, Rr = { class: "weather-card__metric" }, Tr = { class: "weather-card__metric" }, Wr = { class: "weather-card__updated" }, Br = /* @__PURE__ */ D({
733
+ __name: "WeatherCard",
734
+ props: {
735
+ city: {}
736
+ },
737
+ setup(e) {
738
+ const r = e, t = Q(() => r.city.trim()), n = Q(() => {
739
+ var a;
740
+ return ((a = s.value) == null ? void 0 : a.city) ?? (t.value || "未选择城市");
741
+ }), o = K(!1), l = K(""), p = K("empty"), s = K(null);
742
+ let C = null, R = 0;
743
+ We(
744
+ t,
745
+ (a) => {
746
+ H(a);
747
+ },
748
+ { immediate: !0 }
749
+ ), Be(() => {
750
+ C == null || C.abort();
751
+ });
752
+ async function H(a) {
753
+ const i = ++R;
754
+ if (C == null || C.abort(), C = null, s.value = null, l.value = "", !a) {
755
+ o.value = !1, p.value = "empty", l.value = "请输入城市名称";
756
+ return;
757
+ }
758
+ const d = new AbortController();
759
+ C = d, o.value = !0;
760
+ try {
761
+ const m = await U(a, d.signal), I = await F(m, d.signal);
762
+ if (i !== R)
763
+ return;
764
+ s.value = L(m, I);
765
+ } catch (m) {
766
+ if (d.signal.aborted || i !== R)
767
+ return;
768
+ p.value = "error", l.value = m instanceof Error ? m.message : "天气数据请求失败";
769
+ } finally {
770
+ i === R && (o.value = !1, C === d && (C = null));
771
+ }
772
+ }
773
+ async function U(a, i) {
774
+ var d;
775
+ const m = new URL("https://geocoding-api.open-meteo.com/v1/search");
776
+ m.searchParams.set("name", a), m.searchParams.set("count", "1"), m.searchParams.set("language", "zh"), m.searchParams.set("format", "json");
777
+ const I = await fetch(m, { signal: i });
778
+ if (!I.ok)
779
+ throw new Error("城市查询失败");
780
+ const N = (d = (await I.json()).results) == null ? void 0 : d[0];
781
+ if (!N)
782
+ throw new Error(`未找到城市:${a}`);
783
+ return N;
784
+ }
785
+ async function F(a, i) {
786
+ const d = new URL("https://api.open-meteo.com/v1/forecast");
787
+ d.searchParams.set("latitude", String(a.latitude)), d.searchParams.set("longitude", String(a.longitude)), d.searchParams.set(
788
+ "current",
789
+ "temperature_2m,relative_humidity_2m,weather_code,wind_speed_10m"
790
+ ), d.searchParams.set("daily", "temperature_2m_max,temperature_2m_min"), d.searchParams.set("forecast_days", "1"), d.searchParams.set("timezone", "auto");
791
+ const m = await fetch(d, { signal: i });
792
+ if (!m.ok)
793
+ throw new Error("天气数据请求失败");
794
+ const I = await m.json();
795
+ if (!I.current)
796
+ throw new Error("天气数据暂不可用");
797
+ return I;
798
+ }
799
+ function L(a, i) {
800
+ var d, m, I, N, ee, re;
801
+ const E = i.current, x = i.daily, ke = [a.admin2, a.admin1, a.country].filter((te, Ce, ve) => !!te && ve.indexOf(te) === Ce).join(" / ");
802
+ return {
803
+ city: a.name,
804
+ region: ke,
805
+ condition: we(E == null ? void 0 : E.weather_code),
806
+ temperature: E == null ? void 0 : E.temperature_2m,
807
+ temperatureUnit: ((d = i.current_units) == null ? void 0 : d.temperature_2m) ?? "°C",
808
+ humidity: E == null ? void 0 : E.relative_humidity_2m,
809
+ humidityUnit: ((m = i.current_units) == null ? void 0 : m.relative_humidity_2m) ?? "%",
810
+ windSpeed: E == null ? void 0 : E.wind_speed_10m,
811
+ windSpeedUnit: ((I = i.current_units) == null ? void 0 : I.wind_speed_10m) ?? "km/h",
812
+ high: (N = x == null ? void 0 : x.temperature_2m_max) == null ? void 0 : N[0],
813
+ low: (ee = x == null ? void 0 : x.temperature_2m_min) == null ? void 0 : ee[0],
814
+ rangeUnit: ((re = i.daily_units) == null ? void 0 : re.temperature_2m_max) ?? "°C",
815
+ updatedAt: _e(E == null ? void 0 : E.time)
816
+ };
817
+ }
818
+ function we(a) {
819
+ return a === 0 ? { label: "晴", tone: "clear" } : a === 1 || a === 2 ? { label: "多云", tone: "cloudy" } : a === 3 ? { label: "阴", tone: "cloudy" } : a === 45 || a === 48 ? { label: "雾", tone: "fog" } : [51, 53, 55, 56, 57, 61, 63, 65, 66, 67, 80, 81, 82].includes(a ?? -1) ? { label: "降雨", tone: "rain" } : [71, 73, 75, 77, 85, 86].includes(a ?? -1) ? { label: "降雪", tone: "snow" } : [95, 96, 99].includes(a ?? -1) ? { label: "雷阵雨", tone: "storm" } : { label: "未知", tone: "neutral" };
820
+ }
821
+ function _e(a) {
822
+ return a ? a.replace("T", " ") : "未知";
823
+ }
824
+ function M(a, i) {
825
+ return typeof a != "number" ? "--" : `${Math.round(a)}${i}`;
826
+ }
827
+ return (a, i) => {
828
+ var d, m;
829
+ return _(), v("section", {
830
+ class: "weather-card",
831
+ "aria-busy": o.value
832
+ }, [
833
+ u("div", _r, [
834
+ u("div", kr, [
835
+ i[0] || (i[0] = u("div", { class: "weather-card__label" }, "实时天气", -1)),
836
+ u("h2", Cr, P(n.value), 1),
837
+ (d = s.value) != null && d.region ? (_(), v("p", vr, P(s.value.region), 1)) : B("", !0)
838
+ ]),
839
+ u("div", {
840
+ class: j(["weather-card__badge", s.value ? `weather-card__badge--${s.value.condition.tone}` : void 0])
841
+ }, P(((m = s.value) == null ? void 0 : m.condition.label) ?? "待更新"), 3)
842
+ ]),
843
+ o.value ? (_(), v("div", Ir, "正在获取天气...")) : l.value ? (_(), v("div", {
844
+ key: 1,
845
+ class: j(["weather-card__state", { "weather-card__state--error": p.value === "error" }])
846
+ }, P(l.value), 3)) : s.value ? (_(), v("div", Er, [
847
+ u("div", Pr, P(M(s.value.temperature, s.value.temperatureUnit)), 1),
848
+ u("div", Sr, [
849
+ u("span", null, "最高 " + P(M(s.value.high, s.value.rangeUnit)), 1),
850
+ u("span", null, "最低 " + P(M(s.value.low, s.value.rangeUnit)), 1)
851
+ ]),
852
+ u("div", Ar, [
853
+ u("div", Rr, [
854
+ i[1] || (i[1] = u("span", { class: "weather-card__metric-label" }, "湿度", -1)),
855
+ u("strong", null, P(M(s.value.humidity, s.value.humidityUnit)), 1)
856
+ ]),
857
+ u("div", Tr, [
858
+ i[2] || (i[2] = u("span", { class: "weather-card__metric-label" }, "风速", -1)),
859
+ u("strong", null, P(M(s.value.windSpeed, s.value.windSpeedUnit)), 1)
860
+ ])
861
+ ]),
862
+ u("p", Wr, "更新时间 " + P(s.value.updatedAt), 1)
863
+ ])) : B("", !0)
864
+ ], 8, wr);
865
+ };
866
+ }
867
+ }), Mr = [
868
+ {
869
+ packageName: "@byteluck-fe/workbench-template",
870
+ version: "0.1.1",
871
+ componentRef: "@byteluck-fe/workbench-template.WeatherCard",
872
+ componentName: "天气组件",
873
+ exportName: "WeatherCard",
874
+ enabled: !0,
875
+ component: Br,
876
+ validateProps: (e) => typeof e.city == "string" && e.city.trim().length > 0
877
+ }
878
+ // 示例:
879
+ // {
880
+ // packageName: '@fde-components/sales-summary',
881
+ // version: '1.2.0',
882
+ // componentRef: '@fde-components/sales-summary.SalesSummaryCard',
883
+ // componentName: '销售摘要组件',
884
+ // exportName: 'SalesSummaryCard',
885
+ // enabled: true,
886
+ // component: SalesSummaryCard,
887
+ // validateProps: (props) => typeof props.amount === 'number' && typeof props.trend === 'number',
888
+ // },
889
+ ], Nr = new Map(Mr.map((e) => [e.componentRef, e]));
890
+ function Or(e, r, t) {
891
+ var n;
892
+ return ((n = e.validateProps) == null ? void 0 : n.call(e, r, t)) ?? !0;
893
+ }
894
+ const lt = {
895
+ /**
896
+ * 根据 componentRef 查找已安装、已审核并启用的 npm 组件。
897
+ * @param data - FDE 自定义组件卡片数据。
898
+ * @returns 命中的组件登记项;未登记或禁用时返回 null。
899
+ */
900
+ resolve(e) {
901
+ const r = Nr.get(e.componentRef);
902
+ return !r || r.enabled === !1 ? null : r;
903
+ },
904
+ validateProps: Or
905
+ }, h = {
906
+ radius: "standard",
907
+ border: "light",
908
+ shadow: "soft",
909
+ texture: "white",
910
+ textureColor: "#ffffff",
911
+ motion: "none",
912
+ density: "standard"
913
+ }, ut = [
914
+ {
915
+ key: "radius",
916
+ label: "圆角",
917
+ options: [
918
+ { value: "square", label: "直角" },
919
+ { value: "small", label: "小圆角" },
920
+ { value: "standard", label: "标准圆角" },
921
+ { value: "large", label: "大圆角" }
922
+ ]
923
+ },
924
+ {
925
+ key: "border",
926
+ label: "边框",
927
+ options: [
928
+ { value: "none", label: "无边框" },
929
+ { value: "light", label: "浅色细边框" },
930
+ { value: "strong", label: "强边框" }
931
+ ]
932
+ },
933
+ {
934
+ key: "shadow",
935
+ label: "阴影",
936
+ options: [
937
+ { value: "none", label: "无阴影" },
938
+ { value: "soft", label: "弱悬浮" },
939
+ { value: "strong", label: "强悬浮" }
940
+ ]
941
+ },
942
+ {
943
+ key: "texture",
944
+ label: "质感",
945
+ options: [
946
+ { value: "white", label: "纯白" },
947
+ { value: "muted", label: "浅灰底" },
948
+ { value: "glass", label: "磨砂玻璃" },
949
+ { value: "texture", label: "纹理底" }
950
+ ]
951
+ },
952
+ {
953
+ key: "motion",
954
+ label: "动效",
955
+ options: [
956
+ { value: "none", label: "无动效" },
957
+ { value: "lift", label: "悬浮微动" },
958
+ { value: "glow", label: "渐变光效" }
959
+ ]
960
+ },
961
+ {
962
+ key: "density",
963
+ label: "密度",
964
+ options: [
965
+ { value: "loose", label: "宽松版" },
966
+ { value: "standard", label: "标准版" },
967
+ { value: "compact", label: "高密度紧凑版" }
968
+ ]
969
+ }
970
+ ], $r = {
971
+ radius: ["square", "small", "standard", "large"],
972
+ border: ["none", "light", "strong"],
973
+ shadow: ["none", "soft", "strong"],
974
+ texture: ["white", "muted", "glass", "texture", "color"],
975
+ motion: ["none", "lift", "glow"],
976
+ density: ["loose", "standard", "compact"]
977
+ };
978
+ function X(e) {
979
+ return e && typeof e == "object" && !Array.isArray(e) ? e : {};
980
+ }
981
+ function T(e, r) {
982
+ const t = h[e];
983
+ return typeof r == "string" && $r[e].includes(r) ? r : t;
984
+ }
985
+ function Dr(e) {
986
+ return typeof e == "string" && /^#[0-9a-fA-F]{6}$/.test(e) ? e.toLowerCase() : h.textureColor;
987
+ }
988
+ function z(e) {
989
+ const r = X(e);
990
+ return {
991
+ radius: T("radius", r.radius),
992
+ border: T("border", r.border),
993
+ shadow: T("shadow", r.shadow),
994
+ texture: T("texture", r.texture),
995
+ textureColor: Dr(r.textureColor),
996
+ motion: T("motion", r.motion),
997
+ density: T("density", r.density)
998
+ };
999
+ }
1000
+ function mt(e) {
1001
+ const r = z(e);
1002
+ return r.radius === h.radius && r.border === h.border && r.shadow === h.shadow && r.texture === h.texture && r.textureColor === h.textureColor && r.motion === h.motion && r.density === h.density;
1003
+ }
1004
+ const Hr = {
1005
+ square: 0,
1006
+ small: 4,
1007
+ standard: 8,
1008
+ large: 16
1009
+ }, Ur = {
1010
+ none: "none",
1011
+ soft: "soft",
1012
+ standard: "soft",
1013
+ strong: "strong"
1014
+ }, Fr = {
1015
+ thumbnail: "compact",
1016
+ compact: "compact",
1017
+ standard: "standard",
1018
+ expanded: "loose"
1019
+ };
1020
+ function ft(e) {
1021
+ const r = z(e);
1022
+ return {
1023
+ cardStyle: {
1024
+ cardRadius: Hr[r.radius],
1025
+ cardShadow: r.shadow === "strong" ? "strong" : r.shadow,
1026
+ density: r.density === "loose" ? "expanded" : r.density,
1027
+ ...r.texture === "color" ? { backgroundColor: r.textureColor } : {},
1028
+ shell: { ...r }
1029
+ }
1030
+ };
1031
+ }
1032
+ function ht(e) {
1033
+ const r = X(e == null ? void 0 : e.cardStyle), t = X(r.shell);
1034
+ if (Object.keys(t).length > 0)
1035
+ return z(t);
1036
+ const n = typeof r.cardRadius == "number" ? r.cardRadius <= 0 ? "square" : r.cardRadius <= 4 ? "small" : r.cardRadius >= 16 ? "large" : "standard" : h.radius, o = typeof r.cardShadow == "string" && Ur[r.cardShadow] || h.shadow, l = typeof r.density == "string" && Fr[r.density] || h.density, p = typeof r.backgroundColor == "string" ? r.backgroundColor : void 0;
1037
+ return z({
1038
+ radius: n,
1039
+ border: h.border,
1040
+ shadow: o,
1041
+ texture: p ? "color" : h.texture,
1042
+ textureColor: p,
1043
+ motion: h.motion,
1044
+ density: l
1045
+ });
1046
+ }
1047
+ const pt = "@fses/workbench-app";
1048
+ export {
1049
+ Kr as A,
1050
+ Gr as B,
1051
+ qe as C,
1052
+ h as D,
1053
+ De as E,
1054
+ Yr as F,
1055
+ Oe as G,
1056
+ Jr as H,
1057
+ lt as I,
1058
+ ze as J,
1059
+ O as K,
1060
+ Ve as L,
1061
+ ot as M,
1062
+ qr as N,
1063
+ ut as W,
1064
+ xe as _,
1065
+ nt as a,
1066
+ Qr as b,
1067
+ dt as c,
1068
+ tt as d,
1069
+ Ze as e,
1070
+ at as f,
1071
+ Xr as g,
1072
+ et as h,
1073
+ rt as i,
1074
+ jr as j,
1075
+ zr as k,
1076
+ st as l,
1077
+ ht as m,
1078
+ z as n,
1079
+ mt as o,
1080
+ Zr as p,
1081
+ ft as q,
1082
+ Vr as r,
1083
+ it as s,
1084
+ le as t,
1085
+ pt as u,
1086
+ ct as v,
1087
+ or as w,
1088
+ br as x,
1089
+ gr as y,
1090
+ yr as z
1091
+ };