@fses/workbench-app 0.1.3 → 0.2.1

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 (804) hide show
  1. package/WORKBENCH-CLOSURE.json +80 -0
  2. package/dist/{Workspace-CvJghuPy.js → Workspace-DMye5DU8.js} +11458 -11325
  3. package/dist/canvas/api/index.d.ts +7 -0
  4. package/dist/canvas/api/index.js +4 -0
  5. package/dist/canvasFacade-B0oy__da.js +1932 -0
  6. package/dist/cardFactory-CoDF-zsR.js +1392 -0
  7. package/dist/extensions/index.d.ts +2 -0
  8. package/dist/extensions/index.js +8 -0
  9. package/dist/fses-workbench-app.js +89 -86
  10. package/dist/index-DbH6tMQy.js +837 -0
  11. package/dist/internal/personal-workbench/lib/workbenchChatReplyBridge.d.ts +24 -0
  12. package/dist/runtime/index.js +1 -1
  13. package/dist/style.css +1 -1
  14. package/dist/{useWorkbenchRuntime-Pekhufen.js → useWorkbenchRuntime-XpOzwm56.js} +8752 -11980
  15. package/dist/workbenchCustomComponentRegistry-6GHzavdM.js +267 -0
  16. package/node_modules/@byteluck/agentic-protocol/LICENSE +9 -0
  17. package/node_modules/@byteluck/agentic-protocol/README.md +74 -0
  18. package/node_modules/@byteluck/agentic-protocol/dist/index.d.ts +1623 -0
  19. package/node_modules/@byteluck/agentic-protocol/dist/index.mjs +3380 -0
  20. package/node_modules/@byteluck/agentic-protocol/package.json +37 -0
  21. package/node_modules/@byteluck/workbench-skill-contracts/LICENSE +9 -0
  22. package/node_modules/@byteluck/workbench-skill-contracts/dist/index.d.ts +234 -0
  23. package/node_modules/@byteluck/workbench-skill-contracts/dist/index.mjs +394 -0
  24. package/node_modules/@byteluck/workbench-skill-contracts/package.json +37 -0
  25. package/node_modules/@fses/ai-chat/LICENSE +9 -0
  26. package/node_modules/@fses/ai-chat/README.md +320 -0
  27. package/node_modules/@fses/ai-chat/dist/chart-card/data.d.ts +12 -0
  28. package/node_modules/@fses/ai-chat/dist/chart-card/from-markdown.d.ts +11 -0
  29. package/node_modules/@fses/ai-chat/dist/chart-card/from-tool.d.ts +8 -0
  30. package/node_modules/@fses/ai-chat/dist/chart-card/options.d.ts +4 -0
  31. package/node_modules/@fses/ai-chat/dist/chart-card/trace.d.ts +19 -0
  32. package/node_modules/@fses/ai-chat/dist/chart-card/types.d.ts +133 -0
  33. package/node_modules/@fses/ai-chat/dist/components/CardRecommendationDeferredDraft.vue.d.ts +13 -0
  34. package/node_modules/@fses/ai-chat/dist/components/CardRecommendationDraft.vue.d.ts +18 -0
  35. package/node_modules/@fses/ai-chat/dist/components/ChartCardRenderer.vue.d.ts +11 -0
  36. package/node_modules/@fses/ai-chat/dist/components/ChatMessageItem.vue.d.ts +76 -0
  37. package/node_modules/@fses/ai-chat/dist/components/ChatMessageList.vue.d.ts +79 -0
  38. package/node_modules/@fses/ai-chat/dist/components/ChatSender.vue.d.ts +98 -0
  39. package/node_modules/@fses/ai-chat/dist/components/CollapsedToolActivity.vue.d.ts +9 -0
  40. package/node_modules/@fses/ai-chat/dist/components/ContextUsageRing.vue.d.ts +12 -0
  41. package/node_modules/@fses/ai-chat/dist/components/EChartsView.vue.d.ts +6 -0
  42. package/node_modules/@fses/ai-chat/dist/components/FsesAiChat.vue.d.ts +306 -0
  43. package/node_modules/@fses/ai-chat/dist/components/PlanDraftCard.vue.d.ts +19 -0
  44. package/node_modules/@fses/ai-chat/dist/components/ShellExecPanel.vue.d.ts +6 -0
  45. package/node_modules/@fses/ai-chat/dist/components/TaskTodoPlanBar.vue.d.ts +6 -0
  46. package/node_modules/@fses/ai-chat/dist/components/ThinkingShimmer.vue.d.ts +6 -0
  47. package/node_modules/@fses/ai-chat/dist/composables/context-usage.d.ts +11 -0
  48. package/node_modules/@fses/ai-chat/dist/composables/types.d.ts +465 -0
  49. package/node_modules/@fses/ai-chat/dist/composables/useChat.d.ts +2 -0
  50. package/node_modules/@fses/ai-chat/dist/composables/useSystemEChartsIcon.d.ts +11 -0
  51. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.js +11408 -0
  52. package/node_modules/@fses/ai-chat/dist/fses-ai-chat.umd.cjs +25 -0
  53. package/node_modules/@fses/ai-chat/dist/index.d.ts +17 -0
  54. package/node_modules/@fses/ai-chat/dist/plugin.d.ts +8 -0
  55. package/node_modules/@fses/ai-chat/dist/style.css +1 -0
  56. package/node_modules/@fses/ai-chat/dist/utils/assistant-markdown.d.ts +11 -0
  57. package/node_modules/@fses/ai-chat/dist/utils/attachment-upload.d.ts +22 -0
  58. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-config-summary.d.ts +86 -0
  59. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-field-label.d.ts +24 -0
  60. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-source.d.ts +18 -0
  61. package/node_modules/@fses/ai-chat/dist/utils/card-recommendation-title-source.d.ts +12 -0
  62. package/node_modules/@fses/ai-chat/dist/utils/chart-card-visibility.d.ts +24 -0
  63. package/node_modules/@fses/ai-chat/dist/utils/derived-process-labels.d.ts +13 -0
  64. package/node_modules/@fses/ai-chat/dist/utils/echarts-recommendation-icon.d.ts +36 -0
  65. package/node_modules/@fses/ai-chat/dist/utils/group-messages.d.ts +30 -0
  66. package/node_modules/@fses/ai-chat/dist/utils/status-activity.d.ts +48 -0
  67. package/node_modules/@fses/ai-chat/dist/utils/system-echarts-template-icons.generated.d.ts +305 -0
  68. package/node_modules/@fses/ai-chat/dist/utils/system-echarts-template.d.ts +20 -0
  69. package/node_modules/@fses/ai-chat/dist/utils/task-todo-plan.d.ts +40 -0
  70. package/node_modules/@fses/ai-chat/dist/utils/workbench-echarts-theme.d.ts +35 -0
  71. package/node_modules/@fses/ai-chat/package.json +81 -0
  72. package/node_modules/@fses/workbench-card/LICENSE +9 -0
  73. package/node_modules/@fses/workbench-card/README.md +81 -0
  74. package/node_modules/@fses/workbench-card/dist/chart/index.d.ts +8 -0
  75. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-echarts-protocol.js +2230 -0
  76. package/node_modules/@fses/workbench-card/dist/fses-workbench-card-renderers.js +33731 -0
  77. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.js +21238 -0
  78. package/node_modules/@fses/workbench-card/dist/fses-workbench-card.umd.cjs +1 -0
  79. package/node_modules/@fses/workbench-card/dist/index.d.ts +11 -0
  80. package/node_modules/@fses/workbench-card/dist/registry/cardRegistry.d.ts +50 -0
  81. package/node_modules/@fses/workbench-card/dist/registry/compositeCardPatterns.d.ts +39 -0
  82. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateCategories.d.ts +20 -0
  83. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateRegistry.d.ts +1158 -0
  84. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateRegistry.generated.d.ts +1141 -0
  85. package/node_modules/@fses/workbench-card/dist/registry/echartsTemplateTypes.d.ts +76 -0
  86. package/node_modules/@fses/workbench-card/dist/registry/index.d.ts +10 -0
  87. package/node_modules/@fses/workbench-card/dist/renderers/WorkbenchBlockRenderer.vue.d.ts +55 -0
  88. package/node_modules/@fses/workbench-card/dist/renderers/chart/ChartRegistry.vue.d.ts +22 -0
  89. package/node_modules/@fses/workbench-card/dist/renderers/chart/EChartsProtocolRenderer.vue.d.ts +34 -0
  90. package/node_modules/@fses/workbench-card/dist/renderers/chart/chartRendererRegistry.d.ts +219 -0
  91. package/node_modules/@fses/workbench-card/dist/renderers/chart/chartResponsiveLayout.d.ts +47 -0
  92. package/node_modules/@fses/workbench-card/dist/renderers/chart/dynamicEchartOption.d.ts +30 -0
  93. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/adapter.d.ts +73 -0
  94. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/composite.converter.d.ts +11 -0
  95. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/configOnly.converter.d.ts +11 -0
  96. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/geo.converter.d.ts +10 -0
  97. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/graphic.converter.d.ts +10 -0
  98. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/layout.converter.d.ts +11 -0
  99. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/network.converter.d.ts +10 -0
  100. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/scene3D.converter.d.ts +11 -0
  101. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/series.converter.d.ts +10 -0
  102. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/table.converter.d.ts +10 -0
  103. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/timeline.converter.d.ts +11 -0
  104. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/transition.converter.d.ts +11 -0
  105. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/tree.converter.d.ts +10 -0
  106. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/converters/tuple.converter.d.ts +10 -0
  107. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/index.d.ts +9 -0
  108. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/merger.d.ts +16 -0
  109. package/node_modules/@fses/workbench-card/dist/renderers/chart/echarts-protocol/types.d.ts +447 -0
  110. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsRuntimeInteractions.d.ts +30 -0
  111. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsTitle.d.ts +13 -0
  112. package/node_modules/@fses/workbench-card/dist/renderers/chart/echartsTooltipPortal.d.ts +12 -0
  113. package/node_modules/@fses/workbench-card/dist/renderers/chart/types.d.ts +47 -0
  114. package/node_modules/@fses/workbench-card/dist/renderers/chart/useEchart.d.ts +29 -0
  115. package/node_modules/@fses/workbench-card/dist/renderers/chart/workbenchChartTheme.d.ts +36 -0
  116. package/node_modules/@fses/workbench-card/dist/renderers/custom-canvas/canvasLayoutBindings.d.ts +86 -0
  117. package/node_modules/@fses/workbench-card/dist/renderers/hostBridge.d.ts +61 -0
  118. package/node_modules/@fses/workbench-card/dist/renderers/index.d.ts +17 -0
  119. package/node_modules/@fses/workbench-card/dist/renderers/native/nativeBindings.d.ts +145 -0
  120. package/node_modules/@fses/workbench-card/dist/renderers/nested/nestedBlockBindings.d.ts +107 -0
  121. package/node_modules/@fses/workbench-card/dist/renderers/quickLinkDisplay.d.ts +24 -0
  122. package/node_modules/@fses/workbench-card/dist/renderers/reference-composite/referenceCompositeBindings.d.ts +171 -0
  123. package/node_modules/@fses/workbench-card/dist/renderers/reference-composite/referenceRiskAndStrategyBindings.d.ts +91 -0
  124. package/node_modules/@fses/workbench-card/dist/renderers/resizableTable.d.ts +51 -0
  125. package/node_modules/@fses/workbench-card/dist/renderers/style.css +1 -0
  126. package/node_modules/@fses/workbench-card/dist/renderers/tableDisplay.d.ts +25 -0
  127. package/node_modules/@fses/workbench-card/dist/renderers/useWorkbenchBlockRendererBindings.d.ts +580 -0
  128. package/node_modules/@fses/workbench-card/dist/shell/workbenchVisualShell.d.ts +48 -0
  129. package/node_modules/@fses/workbench-card/dist/style.css +1 -0
  130. package/node_modules/@fses/workbench-card/dist/types/block.d.ts +2002 -0
  131. package/node_modules/@fses/workbench-card/dist/types/canvas.d.ts +25 -0
  132. package/node_modules/@fses/workbench-card/dist/types/echartsProtocol.d.ts +445 -0
  133. package/node_modules/@fses/workbench-card/dist/types/index.d.ts +10 -0
  134. package/node_modules/@fses/workbench-card/dist/types/registry.d.ts +7 -0
  135. package/node_modules/@fses/workbench-card/dist/types/runtime.d.ts +34 -0
  136. package/node_modules/@fses/workbench-card/package.json +82 -0
  137. package/node_modules/@fses/workbench-card/src/chart/index.ts +8 -0
  138. package/node_modules/@fses/workbench-card/src/index.ts +13 -0
  139. package/node_modules/@fses/workbench-card/src/registry/cardRegistry.ts +476 -0
  140. package/node_modules/@fses/workbench-card/src/registry/compositeCardPatterns.ts +206 -0
  141. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateCategories.ts +74 -0
  142. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.generated.ts +19951 -0
  143. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateRegistry.ts +32 -0
  144. package/node_modules/@fses/workbench-card/src/registry/echartsTemplateTypes.ts +83 -0
  145. package/node_modules/@fses/workbench-card/src/registry/index.ts +10 -0
  146. package/node_modules/@fses/workbench-card/src/renderers/WorkbenchBlockRenderer.vue +2728 -0
  147. package/node_modules/@fses/workbench-card/src/renderers/chart/ChartRegistry.vue +221 -0
  148. package/node_modules/@fses/workbench-card/src/renderers/chart/EChartsProtocolRenderer.vue +304 -0
  149. package/node_modules/@fses/workbench-card/src/renderers/chart/chartRendererRegistry.ts +311 -0
  150. package/node_modules/@fses/workbench-card/src/renderers/chart/chartResponsiveLayout.ts +172 -0
  151. package/node_modules/@fses/workbench-card/src/renderers/chart/dynamicEchartOption.ts +127 -0
  152. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/adapter.ts +1349 -0
  153. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/composite.converter.ts +71 -0
  154. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/configOnly.converter.ts +45 -0
  155. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/geo.converter.ts +97 -0
  156. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/graphic.converter.ts +59 -0
  157. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/layout.converter.ts +53 -0
  158. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/network.converter.ts +82 -0
  159. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/scene3D.converter.ts +73 -0
  160. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/series.converter.ts +795 -0
  161. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/table.converter.ts +195 -0
  162. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/timeline.converter.ts +62 -0
  163. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/transition.converter.ts +58 -0
  164. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/tree.converter.ts +75 -0
  165. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/converters/tuple.converter.ts +112 -0
  166. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/index.ts +10 -0
  167. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/merger.ts +109 -0
  168. package/node_modules/@fses/workbench-card/src/renderers/chart/echarts-protocol/types.ts +515 -0
  169. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsRuntimeInteractions.ts +450 -0
  170. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsTitle.ts +94 -0
  171. package/node_modules/@fses/workbench-card/src/renderers/chart/echartsTooltipPortal.ts +140 -0
  172. package/node_modules/@fses/workbench-card/src/renderers/chart/types.ts +53 -0
  173. package/node_modules/@fses/workbench-card/src/renderers/chart/useEchart.ts +1820 -0
  174. package/node_modules/@fses/workbench-card/src/renderers/chart/workbenchChartTheme.ts +240 -0
  175. package/node_modules/@fses/workbench-card/src/renderers/custom-canvas/canvasLayoutBindings.ts +660 -0
  176. package/node_modules/@fses/workbench-card/src/renderers/hostBridge.ts +74 -0
  177. package/node_modules/@fses/workbench-card/src/renderers/index.ts +25 -0
  178. package/node_modules/@fses/workbench-card/src/renderers/native/nativeBindings.ts +1081 -0
  179. package/node_modules/@fses/workbench-card/src/renderers/nested/nestedBlockBindings.ts +1349 -0
  180. package/node_modules/@fses/workbench-card/src/renderers/quickLinkDisplay.ts +53 -0
  181. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceCompositeBindings.ts +3205 -0
  182. package/node_modules/@fses/workbench-card/src/renderers/reference-composite/referenceRiskAndStrategyBindings.ts +1004 -0
  183. package/node_modules/@fses/workbench-card/src/renderers/resizableTable.ts +136 -0
  184. package/node_modules/@fses/workbench-card/src/renderers/tableDisplay.ts +140 -0
  185. package/node_modules/@fses/workbench-card/src/renderers/useWorkbenchBlockRendererBindings.ts +3192 -0
  186. package/node_modules/@fses/workbench-card/src/shell/workbenchVisualShell.ts +228 -0
  187. package/node_modules/@fses/workbench-card/src/styles/workbench-card.css +343 -0
  188. package/node_modules/@fses/workbench-card/src/types/block.ts +2487 -0
  189. package/node_modules/@fses/workbench-card/src/types/canvas.ts +30 -0
  190. package/node_modules/@fses/workbench-card/src/types/echartsProtocol.ts +513 -0
  191. package/node_modules/@fses/workbench-card/src/types/index.ts +10 -0
  192. package/node_modules/@fses/workbench-card/src/types/registry.ts +17 -0
  193. package/node_modules/@fses/workbench-card/src/types/runtime.ts +31 -0
  194. package/node_modules/dompurify/LICENSE +568 -0
  195. package/node_modules/dompurify/README.md +523 -0
  196. package/node_modules/dompurify/dist/purify.cjs.d.ts +451 -0
  197. package/node_modules/dompurify/dist/purify.cjs.js +1472 -0
  198. package/node_modules/dompurify/dist/purify.cjs.js.map +1 -0
  199. package/node_modules/dompurify/dist/purify.es.d.mts +448 -0
  200. package/node_modules/dompurify/dist/purify.es.mjs +1470 -0
  201. package/node_modules/dompurify/dist/purify.es.mjs.map +1 -0
  202. package/node_modules/dompurify/dist/purify.js +1478 -0
  203. package/node_modules/dompurify/dist/purify.js.map +1 -0
  204. package/node_modules/dompurify/dist/purify.min.js +3 -0
  205. package/node_modules/dompurify/dist/purify.min.js.map +1 -0
  206. package/node_modules/dompurify/package.json +168 -0
  207. package/node_modules/zod/LICENSE +21 -0
  208. package/node_modules/zod/README.md +208 -0
  209. package/node_modules/zod/index.cjs +33 -0
  210. package/node_modules/zod/index.d.cts +4 -0
  211. package/node_modules/zod/index.d.ts +4 -0
  212. package/node_modules/zod/index.js +4 -0
  213. package/node_modules/zod/package.json +118 -0
  214. package/node_modules/zod/src/index.ts +4 -0
  215. package/node_modules/zod/src/v3/ZodError.ts +330 -0
  216. package/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
  217. package/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
  218. package/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
  219. package/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
  220. package/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
  221. package/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
  222. package/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
  223. package/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
  224. package/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
  225. package/node_modules/zod/src/v3/errors.ts +13 -0
  226. package/node_modules/zod/src/v3/external.ts +6 -0
  227. package/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
  228. package/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
  229. package/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
  230. package/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
  231. package/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
  232. package/node_modules/zod/src/v3/helpers/util.ts +224 -0
  233. package/node_modules/zod/src/v3/index.ts +4 -0
  234. package/node_modules/zod/src/v3/locales/en.ts +124 -0
  235. package/node_modules/zod/src/v3/standard-schema.ts +113 -0
  236. package/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
  237. package/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
  238. package/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
  239. package/node_modules/zod/src/v3/tests/array.test.ts +71 -0
  240. package/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
  241. package/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
  242. package/node_modules/zod/src/v3/tests/base.test.ts +29 -0
  243. package/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
  244. package/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
  245. package/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
  246. package/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
  247. package/node_modules/zod/src/v3/tests/complex.test.ts +56 -0
  248. package/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
  249. package/node_modules/zod/src/v3/tests/date.test.ts +32 -0
  250. package/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
  251. package/node_modules/zod/src/v3/tests/default.test.ts +112 -0
  252. package/node_modules/zod/src/v3/tests/description.test.ts +33 -0
  253. package/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
  254. package/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
  255. package/node_modules/zod/src/v3/tests/error.test.ts +551 -0
  256. package/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
  257. package/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
  258. package/node_modules/zod/src/v3/tests/function.test.ts +257 -0
  259. package/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
  260. package/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
  261. package/node_modules/zod/src/v3/tests/intersection.test.ts +110 -0
  262. package/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
  263. package/node_modules/zod/src/v3/tests/language-server.test.ts +207 -0
  264. package/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
  265. package/node_modules/zod/src/v3/tests/map.test.ts +110 -0
  266. package/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
  267. package/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
  268. package/node_modules/zod/src/v3/tests/nan.test.ts +21 -0
  269. package/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
  270. package/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
  271. package/node_modules/zod/src/v3/tests/number.test.ts +176 -0
  272. package/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
  273. package/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
  274. package/node_modules/zod/src/v3/tests/object.test.ts +434 -0
  275. package/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
  276. package/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
  277. package/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
  278. package/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
  279. package/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
  280. package/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
  281. package/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
  282. package/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
  283. package/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
  284. package/node_modules/zod/src/v3/tests/readonly.test.ts +194 -0
  285. package/node_modules/zod/src/v3/tests/record.test.ts +171 -0
  286. package/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
  287. package/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
  288. package/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
  289. package/node_modules/zod/src/v3/tests/set.test.ts +142 -0
  290. package/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
  291. package/node_modules/zod/src/v3/tests/string.test.ts +916 -0
  292. package/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
  293. package/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
  294. package/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
  295. package/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
  296. package/node_modules/zod/src/v3/tests/void.test.ts +15 -0
  297. package/node_modules/zod/src/v3/types.ts +5136 -0
  298. package/node_modules/zod/src/v4/classic/checks.ts +30 -0
  299. package/node_modules/zod/src/v4/classic/coerce.ts +27 -0
  300. package/node_modules/zod/src/v4/classic/compat.ts +66 -0
  301. package/node_modules/zod/src/v4/classic/errors.ts +75 -0
  302. package/node_modules/zod/src/v4/classic/external.ts +50 -0
  303. package/node_modules/zod/src/v4/classic/index.ts +5 -0
  304. package/node_modules/zod/src/v4/classic/iso.ts +90 -0
  305. package/node_modules/zod/src/v4/classic/parse.ts +33 -0
  306. package/node_modules/zod/src/v4/classic/schemas.ts +2054 -0
  307. package/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
  308. package/node_modules/zod/src/v4/classic/tests/array.test.ts +264 -0
  309. package/node_modules/zod/src/v4/classic/tests/assignability.test.ts +210 -0
  310. package/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
  311. package/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
  312. package/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
  313. package/node_modules/zod/src/v4/classic/tests/bigint.test.ts +54 -0
  314. package/node_modules/zod/src/v4/classic/tests/brand.test.ts +63 -0
  315. package/node_modules/zod/src/v4/classic/tests/catch.test.ts +252 -0
  316. package/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
  317. package/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
  318. package/node_modules/zod/src/v4/classic/tests/continuability.test.ts +352 -0
  319. package/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
  320. package/node_modules/zod/src/v4/classic/tests/date.test.ts +31 -0
  321. package/node_modules/zod/src/v4/classic/tests/datetime.test.ts +296 -0
  322. package/node_modules/zod/src/v4/classic/tests/default.test.ts +313 -0
  323. package/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
  324. package/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +619 -0
  325. package/node_modules/zod/src/v4/classic/tests/enum.test.ts +285 -0
  326. package/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +527 -0
  327. package/node_modules/zod/src/v4/classic/tests/error.test.ts +711 -0
  328. package/node_modules/zod/src/v4/classic/tests/file.test.ts +91 -0
  329. package/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +175 -0
  330. package/node_modules/zod/src/v4/classic/tests/function.test.ts +268 -0
  331. package/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
  332. package/node_modules/zod/src/v4/classic/tests/index.test.ts +829 -0
  333. package/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +34 -0
  334. package/node_modules/zod/src/v4/classic/tests/intersection.test.ts +171 -0
  335. package/node_modules/zod/src/v4/classic/tests/json.test.ts +108 -0
  336. package/node_modules/zod/src/v4/classic/tests/lazy.test.ts +227 -0
  337. package/node_modules/zod/src/v4/classic/tests/literal.test.ts +92 -0
  338. package/node_modules/zod/src/v4/classic/tests/map.test.ts +196 -0
  339. package/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
  340. package/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
  341. package/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +86 -0
  342. package/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
  343. package/node_modules/zod/src/v4/classic/tests/number.test.ts +247 -0
  344. package/node_modules/zod/src/v4/classic/tests/object.test.ts +563 -0
  345. package/node_modules/zod/src/v4/classic/tests/optional.test.ts +123 -0
  346. package/node_modules/zod/src/v4/classic/tests/partial.test.ts +147 -0
  347. package/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +127 -0
  348. package/node_modules/zod/src/v4/classic/tests/pipe.test.ts +81 -0
  349. package/node_modules/zod/src/v4/classic/tests/prefault.test.ts +37 -0
  350. package/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +298 -0
  351. package/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
  352. package/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
  353. package/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
  354. package/node_modules/zod/src/v4/classic/tests/readonly.test.ts +252 -0
  355. package/node_modules/zod/src/v4/classic/tests/record.test.ts +342 -0
  356. package/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +356 -0
  357. package/node_modules/zod/src/v4/classic/tests/refine.test.ts +532 -0
  358. package/node_modules/zod/src/v4/classic/tests/registries.test.ts +204 -0
  359. package/node_modules/zod/src/v4/classic/tests/set.test.ts +179 -0
  360. package/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +57 -0
  361. package/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +109 -0
  362. package/node_modules/zod/src/v4/classic/tests/string.test.ts +881 -0
  363. package/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +66 -0
  364. package/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +758 -0
  365. package/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +2314 -0
  366. package/node_modules/zod/src/v4/classic/tests/transform.test.ts +250 -0
  367. package/node_modules/zod/src/v4/classic/tests/tuple.test.ts +163 -0
  368. package/node_modules/zod/src/v4/classic/tests/union.test.ts +94 -0
  369. package/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
  370. package/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
  371. package/node_modules/zod/src/v4/core/api.ts +1594 -0
  372. package/node_modules/zod/src/v4/core/checks.ts +1283 -0
  373. package/node_modules/zod/src/v4/core/config.ts +15 -0
  374. package/node_modules/zod/src/v4/core/core.ts +134 -0
  375. package/node_modules/zod/src/v4/core/doc.ts +44 -0
  376. package/node_modules/zod/src/v4/core/errors.ts +424 -0
  377. package/node_modules/zod/src/v4/core/function.ts +176 -0
  378. package/node_modules/zod/src/v4/core/index.ts +15 -0
  379. package/node_modules/zod/src/v4/core/json-schema.ts +143 -0
  380. package/node_modules/zod/src/v4/core/parse.ts +94 -0
  381. package/node_modules/zod/src/v4/core/regexes.ts +135 -0
  382. package/node_modules/zod/src/v4/core/registries.ts +96 -0
  383. package/node_modules/zod/src/v4/core/schemas.ts +3842 -0
  384. package/node_modules/zod/src/v4/core/standard-schema.ts +64 -0
  385. package/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
  386. package/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
  387. package/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
  388. package/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
  389. package/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
  390. package/node_modules/zod/src/v4/core/to-json-schema.ts +977 -0
  391. package/node_modules/zod/src/v4/core/util.ts +775 -0
  392. package/node_modules/zod/src/v4/core/versions.ts +5 -0
  393. package/node_modules/zod/src/v4/core/zsf.ts +323 -0
  394. package/node_modules/zod/src/v4/index.ts +4 -0
  395. package/node_modules/zod/src/v4/locales/ar.ts +125 -0
  396. package/node_modules/zod/src/v4/locales/az.ts +121 -0
  397. package/node_modules/zod/src/v4/locales/be.ts +184 -0
  398. package/node_modules/zod/src/v4/locales/ca.ts +127 -0
  399. package/node_modules/zod/src/v4/locales/cs.ts +142 -0
  400. package/node_modules/zod/src/v4/locales/de.ts +124 -0
  401. package/node_modules/zod/src/v4/locales/en.ts +127 -0
  402. package/node_modules/zod/src/v4/locales/eo.ts +125 -0
  403. package/node_modules/zod/src/v4/locales/es.ts +125 -0
  404. package/node_modules/zod/src/v4/locales/fa.ts +134 -0
  405. package/node_modules/zod/src/v4/locales/fi.ts +131 -0
  406. package/node_modules/zod/src/v4/locales/fr-CA.ts +126 -0
  407. package/node_modules/zod/src/v4/locales/fr.ts +124 -0
  408. package/node_modules/zod/src/v4/locales/he.ts +125 -0
  409. package/node_modules/zod/src/v4/locales/hu.ts +126 -0
  410. package/node_modules/zod/src/v4/locales/id.ts +125 -0
  411. package/node_modules/zod/src/v4/locales/index.ts +39 -0
  412. package/node_modules/zod/src/v4/locales/it.ts +125 -0
  413. package/node_modules/zod/src/v4/locales/ja.ts +122 -0
  414. package/node_modules/zod/src/v4/locales/kh.ts +126 -0
  415. package/node_modules/zod/src/v4/locales/ko.ts +131 -0
  416. package/node_modules/zod/src/v4/locales/mk.ts +127 -0
  417. package/node_modules/zod/src/v4/locales/ms.ts +124 -0
  418. package/node_modules/zod/src/v4/locales/nl.ts +126 -0
  419. package/node_modules/zod/src/v4/locales/no.ts +124 -0
  420. package/node_modules/zod/src/v4/locales/ota.ts +125 -0
  421. package/node_modules/zod/src/v4/locales/pl.ts +126 -0
  422. package/node_modules/zod/src/v4/locales/ps.ts +133 -0
  423. package/node_modules/zod/src/v4/locales/pt.ts +123 -0
  424. package/node_modules/zod/src/v4/locales/ru.ts +184 -0
  425. package/node_modules/zod/src/v4/locales/sl.ts +126 -0
  426. package/node_modules/zod/src/v4/locales/sv.ts +127 -0
  427. package/node_modules/zod/src/v4/locales/ta.ts +125 -0
  428. package/node_modules/zod/src/v4/locales/th.ts +126 -0
  429. package/node_modules/zod/src/v4/locales/tr.ts +121 -0
  430. package/node_modules/zod/src/v4/locales/ua.ts +126 -0
  431. package/node_modules/zod/src/v4/locales/ur.ts +126 -0
  432. package/node_modules/zod/src/v4/locales/vi.ts +125 -0
  433. package/node_modules/zod/src/v4/locales/zh-CN.ts +123 -0
  434. package/node_modules/zod/src/v4/locales/zh-TW.ts +125 -0
  435. package/node_modules/zod/src/v4/mini/checks.ts +32 -0
  436. package/node_modules/zod/src/v4/mini/coerce.ts +22 -0
  437. package/node_modules/zod/src/v4/mini/external.ts +40 -0
  438. package/node_modules/zod/src/v4/mini/index.ts +3 -0
  439. package/node_modules/zod/src/v4/mini/iso.ts +62 -0
  440. package/node_modules/zod/src/v4/mini/parse.ts +1 -0
  441. package/node_modules/zod/src/v4/mini/schemas.ts +1579 -0
  442. package/node_modules/zod/src/v4/mini/tests/assignability.test.ts +129 -0
  443. package/node_modules/zod/src/v4/mini/tests/brand.test.ts +51 -0
  444. package/node_modules/zod/src/v4/mini/tests/checks.test.ts +144 -0
  445. package/node_modules/zod/src/v4/mini/tests/computed.test.ts +36 -0
  446. package/node_modules/zod/src/v4/mini/tests/error.test.ts +22 -0
  447. package/node_modules/zod/src/v4/mini/tests/functions.test.ts +43 -0
  448. package/node_modules/zod/src/v4/mini/tests/index.test.ts +871 -0
  449. package/node_modules/zod/src/v4/mini/tests/number.test.ts +95 -0
  450. package/node_modules/zod/src/v4/mini/tests/object.test.ts +185 -0
  451. package/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
  452. package/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +275 -0
  453. package/node_modules/zod/src/v4/mini/tests/string.test.ts +299 -0
  454. package/node_modules/zod/src/v4-mini/index.ts +1 -0
  455. package/node_modules/zod/v3/ZodError.cjs +138 -0
  456. package/node_modules/zod/v3/ZodError.d.cts +164 -0
  457. package/node_modules/zod/v3/ZodError.d.ts +164 -0
  458. package/node_modules/zod/v3/ZodError.js +133 -0
  459. package/node_modules/zod/v3/errors.cjs +17 -0
  460. package/node_modules/zod/v3/errors.d.cts +5 -0
  461. package/node_modules/zod/v3/errors.d.ts +5 -0
  462. package/node_modules/zod/v3/errors.js +9 -0
  463. package/node_modules/zod/v3/external.cjs +22 -0
  464. package/node_modules/zod/v3/external.d.cts +6 -0
  465. package/node_modules/zod/v3/external.d.ts +6 -0
  466. package/node_modules/zod/v3/external.js +6 -0
  467. package/node_modules/zod/v3/helpers/enumUtil.cjs +2 -0
  468. package/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
  469. package/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
  470. package/node_modules/zod/v3/helpers/enumUtil.js +1 -0
  471. package/node_modules/zod/v3/helpers/errorUtil.cjs +9 -0
  472. package/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
  473. package/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
  474. package/node_modules/zod/v3/helpers/errorUtil.js +6 -0
  475. package/node_modules/zod/v3/helpers/parseUtil.cjs +124 -0
  476. package/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
  477. package/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
  478. package/node_modules/zod/v3/helpers/parseUtil.js +109 -0
  479. package/node_modules/zod/v3/helpers/partialUtil.cjs +2 -0
  480. package/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
  481. package/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
  482. package/node_modules/zod/v3/helpers/partialUtil.js +1 -0
  483. package/node_modules/zod/v3/helpers/typeAliases.cjs +2 -0
  484. package/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
  485. package/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
  486. package/node_modules/zod/v3/helpers/typeAliases.js +1 -0
  487. package/node_modules/zod/v3/helpers/util.cjs +137 -0
  488. package/node_modules/zod/v3/helpers/util.d.cts +85 -0
  489. package/node_modules/zod/v3/helpers/util.d.ts +85 -0
  490. package/node_modules/zod/v3/helpers/util.js +133 -0
  491. package/node_modules/zod/v3/index.cjs +33 -0
  492. package/node_modules/zod/v3/index.d.cts +4 -0
  493. package/node_modules/zod/v3/index.d.ts +4 -0
  494. package/node_modules/zod/v3/index.js +4 -0
  495. package/node_modules/zod/v3/locales/en.cjs +111 -0
  496. package/node_modules/zod/v3/locales/en.d.cts +3 -0
  497. package/node_modules/zod/v3/locales/en.d.ts +3 -0
  498. package/node_modules/zod/v3/locales/en.js +109 -0
  499. package/node_modules/zod/v3/standard-schema.cjs +2 -0
  500. package/node_modules/zod/v3/standard-schema.d.cts +102 -0
  501. package/node_modules/zod/v3/standard-schema.d.ts +102 -0
  502. package/node_modules/zod/v3/standard-schema.js +1 -0
  503. package/node_modules/zod/v3/types.cjs +3775 -0
  504. package/node_modules/zod/v3/types.d.cts +1031 -0
  505. package/node_modules/zod/v3/types.d.ts +1031 -0
  506. package/node_modules/zod/v3/types.js +3693 -0
  507. package/node_modules/zod/v4/classic/checks.cjs +32 -0
  508. package/node_modules/zod/v4/classic/checks.d.cts +1 -0
  509. package/node_modules/zod/v4/classic/checks.d.ts +1 -0
  510. package/node_modules/zod/v4/classic/checks.js +1 -0
  511. package/node_modules/zod/v4/classic/coerce.cjs +47 -0
  512. package/node_modules/zod/v4/classic/coerce.d.cts +17 -0
  513. package/node_modules/zod/v4/classic/coerce.d.ts +17 -0
  514. package/node_modules/zod/v4/classic/coerce.js +17 -0
  515. package/node_modules/zod/v4/classic/compat.cjs +57 -0
  516. package/node_modules/zod/v4/classic/compat.d.cts +46 -0
  517. package/node_modules/zod/v4/classic/compat.d.ts +46 -0
  518. package/node_modules/zod/v4/classic/compat.js +27 -0
  519. package/node_modules/zod/v4/classic/errors.cjs +67 -0
  520. package/node_modules/zod/v4/classic/errors.d.cts +30 -0
  521. package/node_modules/zod/v4/classic/errors.d.ts +30 -0
  522. package/node_modules/zod/v4/classic/errors.js +41 -0
  523. package/node_modules/zod/v4/classic/external.cjs +70 -0
  524. package/node_modules/zod/v4/classic/external.d.cts +13 -0
  525. package/node_modules/zod/v4/classic/external.d.ts +13 -0
  526. package/node_modules/zod/v4/classic/external.js +18 -0
  527. package/node_modules/zod/v4/classic/index.cjs +33 -0
  528. package/node_modules/zod/v4/classic/index.d.cts +4 -0
  529. package/node_modules/zod/v4/classic/index.d.ts +4 -0
  530. package/node_modules/zod/v4/classic/index.js +4 -0
  531. package/node_modules/zod/v4/classic/iso.cjs +60 -0
  532. package/node_modules/zod/v4/classic/iso.d.cts +22 -0
  533. package/node_modules/zod/v4/classic/iso.d.ts +22 -0
  534. package/node_modules/zod/v4/classic/iso.js +30 -0
  535. package/node_modules/zod/v4/classic/parse.cjs +32 -0
  536. package/node_modules/zod/v4/classic/parse.d.cts +23 -0
  537. package/node_modules/zod/v4/classic/parse.d.ts +23 -0
  538. package/node_modules/zod/v4/classic/parse.js +6 -0
  539. package/node_modules/zod/v4/classic/schemas.cjs +1109 -0
  540. package/node_modules/zod/v4/classic/schemas.d.cts +630 -0
  541. package/node_modules/zod/v4/classic/schemas.d.ts +630 -0
  542. package/node_modules/zod/v4/classic/schemas.js +1006 -0
  543. package/node_modules/zod/v4/core/api.cjs +1039 -0
  544. package/node_modules/zod/v4/core/api.d.cts +284 -0
  545. package/node_modules/zod/v4/core/api.d.ts +284 -0
  546. package/node_modules/zod/v4/core/api.js +906 -0
  547. package/node_modules/zod/v4/core/checks.cjs +591 -0
  548. package/node_modules/zod/v4/core/checks.d.cts +278 -0
  549. package/node_modules/zod/v4/core/checks.d.ts +278 -0
  550. package/node_modules/zod/v4/core/checks.js +565 -0
  551. package/node_modules/zod/v4/core/core.cjs +67 -0
  552. package/node_modules/zod/v4/core/core.d.cts +49 -0
  553. package/node_modules/zod/v4/core/core.d.ts +49 -0
  554. package/node_modules/zod/v4/core/core.js +61 -0
  555. package/node_modules/zod/v4/core/doc.cjs +39 -0
  556. package/node_modules/zod/v4/core/doc.d.cts +14 -0
  557. package/node_modules/zod/v4/core/doc.d.ts +14 -0
  558. package/node_modules/zod/v4/core/doc.js +35 -0
  559. package/node_modules/zod/v4/core/errors.cjs +226 -0
  560. package/node_modules/zod/v4/core/errors.d.cts +208 -0
  561. package/node_modules/zod/v4/core/errors.d.ts +208 -0
  562. package/node_modules/zod/v4/core/errors.js +195 -0
  563. package/node_modules/zod/v4/core/function.cjs +102 -0
  564. package/node_modules/zod/v4/core/function.d.cts +52 -0
  565. package/node_modules/zod/v4/core/function.d.ts +52 -0
  566. package/node_modules/zod/v4/core/function.js +75 -0
  567. package/node_modules/zod/v4/core/index.cjs +44 -0
  568. package/node_modules/zod/v4/core/index.d.cts +15 -0
  569. package/node_modules/zod/v4/core/index.d.ts +15 -0
  570. package/node_modules/zod/v4/core/index.js +15 -0
  571. package/node_modules/zod/v4/core/json-schema.cjs +2 -0
  572. package/node_modules/zod/v4/core/json-schema.d.cts +87 -0
  573. package/node_modules/zod/v4/core/json-schema.d.ts +87 -0
  574. package/node_modules/zod/v4/core/json-schema.js +1 -0
  575. package/node_modules/zod/v4/core/parse.cjs +87 -0
  576. package/node_modules/zod/v4/core/parse.d.cts +25 -0
  577. package/node_modules/zod/v4/core/parse.d.ts +25 -0
  578. package/node_modules/zod/v4/core/parse.js +57 -0
  579. package/node_modules/zod/v4/core/regexes.cjs +103 -0
  580. package/node_modules/zod/v4/core/regexes.d.cts +62 -0
  581. package/node_modules/zod/v4/core/regexes.d.ts +62 -0
  582. package/node_modules/zod/v4/core/regexes.js +95 -0
  583. package/node_modules/zod/v4/core/registries.cjs +56 -0
  584. package/node_modules/zod/v4/core/registries.d.cts +35 -0
  585. package/node_modules/zod/v4/core/registries.d.ts +35 -0
  586. package/node_modules/zod/v4/core/registries.js +51 -0
  587. package/node_modules/zod/v4/core/schemas.cjs +1748 -0
  588. package/node_modules/zod/v4/core/schemas.d.cts +1041 -0
  589. package/node_modules/zod/v4/core/schemas.d.ts +1041 -0
  590. package/node_modules/zod/v4/core/schemas.js +1717 -0
  591. package/node_modules/zod/v4/core/standard-schema.cjs +2 -0
  592. package/node_modules/zod/v4/core/standard-schema.d.cts +55 -0
  593. package/node_modules/zod/v4/core/standard-schema.d.ts +55 -0
  594. package/node_modules/zod/v4/core/standard-schema.js +1 -0
  595. package/node_modules/zod/v4/core/to-json-schema.cjs +854 -0
  596. package/node_modules/zod/v4/core/to-json-schema.d.cts +88 -0
  597. package/node_modules/zod/v4/core/to-json-schema.d.ts +88 -0
  598. package/node_modules/zod/v4/core/to-json-schema.js +849 -0
  599. package/node_modules/zod/v4/core/util.cjs +539 -0
  600. package/node_modules/zod/v4/core/util.d.cts +183 -0
  601. package/node_modules/zod/v4/core/util.d.ts +183 -0
  602. package/node_modules/zod/v4/core/util.js +493 -0
  603. package/node_modules/zod/v4/core/versions.cjs +8 -0
  604. package/node_modules/zod/v4/core/versions.d.cts +5 -0
  605. package/node_modules/zod/v4/core/versions.d.ts +5 -0
  606. package/node_modules/zod/v4/core/versions.js +5 -0
  607. package/node_modules/zod/v4/index.cjs +22 -0
  608. package/node_modules/zod/v4/index.d.cts +3 -0
  609. package/node_modules/zod/v4/index.d.ts +3 -0
  610. package/node_modules/zod/v4/index.js +3 -0
  611. package/node_modules/zod/v4/locales/ar.cjs +142 -0
  612. package/node_modules/zod/v4/locales/ar.d.cts +4 -0
  613. package/node_modules/zod/v4/locales/ar.d.ts +4 -0
  614. package/node_modules/zod/v4/locales/ar.js +116 -0
  615. package/node_modules/zod/v4/locales/az.cjs +141 -0
  616. package/node_modules/zod/v4/locales/az.d.cts +4 -0
  617. package/node_modules/zod/v4/locales/az.d.ts +4 -0
  618. package/node_modules/zod/v4/locales/az.js +115 -0
  619. package/node_modules/zod/v4/locales/be.cjs +190 -0
  620. package/node_modules/zod/v4/locales/be.d.cts +4 -0
  621. package/node_modules/zod/v4/locales/be.d.ts +4 -0
  622. package/node_modules/zod/v4/locales/be.js +164 -0
  623. package/node_modules/zod/v4/locales/ca.cjs +144 -0
  624. package/node_modules/zod/v4/locales/ca.d.cts +4 -0
  625. package/node_modules/zod/v4/locales/ca.d.ts +4 -0
  626. package/node_modules/zod/v4/locales/ca.js +118 -0
  627. package/node_modules/zod/v4/locales/cs.cjs +161 -0
  628. package/node_modules/zod/v4/locales/cs.d.cts +4 -0
  629. package/node_modules/zod/v4/locales/cs.d.ts +4 -0
  630. package/node_modules/zod/v4/locales/cs.js +135 -0
  631. package/node_modules/zod/v4/locales/de.cjs +142 -0
  632. package/node_modules/zod/v4/locales/de.d.cts +4 -0
  633. package/node_modules/zod/v4/locales/de.d.ts +4 -0
  634. package/node_modules/zod/v4/locales/de.js +116 -0
  635. package/node_modules/zod/v4/locales/en.cjs +145 -0
  636. package/node_modules/zod/v4/locales/en.d.cts +5 -0
  637. package/node_modules/zod/v4/locales/en.d.ts +5 -0
  638. package/node_modules/zod/v4/locales/en.js +117 -0
  639. package/node_modules/zod/v4/locales/eo.cjs +144 -0
  640. package/node_modules/zod/v4/locales/eo.d.cts +5 -0
  641. package/node_modules/zod/v4/locales/eo.d.ts +5 -0
  642. package/node_modules/zod/v4/locales/eo.js +116 -0
  643. package/node_modules/zod/v4/locales/es.cjs +143 -0
  644. package/node_modules/zod/v4/locales/es.d.cts +4 -0
  645. package/node_modules/zod/v4/locales/es.d.ts +4 -0
  646. package/node_modules/zod/v4/locales/es.js +117 -0
  647. package/node_modules/zod/v4/locales/fa.cjs +148 -0
  648. package/node_modules/zod/v4/locales/fa.d.cts +4 -0
  649. package/node_modules/zod/v4/locales/fa.d.ts +4 -0
  650. package/node_modules/zod/v4/locales/fa.js +122 -0
  651. package/node_modules/zod/v4/locales/fi.cjs +148 -0
  652. package/node_modules/zod/v4/locales/fi.d.cts +4 -0
  653. package/node_modules/zod/v4/locales/fi.d.ts +4 -0
  654. package/node_modules/zod/v4/locales/fi.js +122 -0
  655. package/node_modules/zod/v4/locales/fr-CA.cjs +143 -0
  656. package/node_modules/zod/v4/locales/fr-CA.d.cts +4 -0
  657. package/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
  658. package/node_modules/zod/v4/locales/fr-CA.js +117 -0
  659. package/node_modules/zod/v4/locales/fr.cjs +142 -0
  660. package/node_modules/zod/v4/locales/fr.d.cts +4 -0
  661. package/node_modules/zod/v4/locales/fr.d.ts +4 -0
  662. package/node_modules/zod/v4/locales/fr.js +116 -0
  663. package/node_modules/zod/v4/locales/he.cjs +143 -0
  664. package/node_modules/zod/v4/locales/he.d.cts +4 -0
  665. package/node_modules/zod/v4/locales/he.d.ts +4 -0
  666. package/node_modules/zod/v4/locales/he.js +117 -0
  667. package/node_modules/zod/v4/locales/hu.cjs +143 -0
  668. package/node_modules/zod/v4/locales/hu.d.cts +4 -0
  669. package/node_modules/zod/v4/locales/hu.d.ts +4 -0
  670. package/node_modules/zod/v4/locales/hu.js +117 -0
  671. package/node_modules/zod/v4/locales/id.cjs +142 -0
  672. package/node_modules/zod/v4/locales/id.d.cts +4 -0
  673. package/node_modules/zod/v4/locales/id.d.ts +4 -0
  674. package/node_modules/zod/v4/locales/id.js +116 -0
  675. package/node_modules/zod/v4/locales/index.cjs +84 -0
  676. package/node_modules/zod/v4/locales/index.d.cts +39 -0
  677. package/node_modules/zod/v4/locales/index.d.ts +39 -0
  678. package/node_modules/zod/v4/locales/index.js +39 -0
  679. package/node_modules/zod/v4/locales/it.cjs +143 -0
  680. package/node_modules/zod/v4/locales/it.d.cts +4 -0
  681. package/node_modules/zod/v4/locales/it.d.ts +4 -0
  682. package/node_modules/zod/v4/locales/it.js +117 -0
  683. package/node_modules/zod/v4/locales/ja.cjs +141 -0
  684. package/node_modules/zod/v4/locales/ja.d.cts +4 -0
  685. package/node_modules/zod/v4/locales/ja.d.ts +4 -0
  686. package/node_modules/zod/v4/locales/ja.js +115 -0
  687. package/node_modules/zod/v4/locales/kh.cjs +143 -0
  688. package/node_modules/zod/v4/locales/kh.d.cts +4 -0
  689. package/node_modules/zod/v4/locales/kh.d.ts +4 -0
  690. package/node_modules/zod/v4/locales/kh.js +117 -0
  691. package/node_modules/zod/v4/locales/ko.cjs +147 -0
  692. package/node_modules/zod/v4/locales/ko.d.cts +4 -0
  693. package/node_modules/zod/v4/locales/ko.d.ts +4 -0
  694. package/node_modules/zod/v4/locales/ko.js +121 -0
  695. package/node_modules/zod/v4/locales/mk.cjs +144 -0
  696. package/node_modules/zod/v4/locales/mk.d.cts +4 -0
  697. package/node_modules/zod/v4/locales/mk.d.ts +4 -0
  698. package/node_modules/zod/v4/locales/mk.js +118 -0
  699. package/node_modules/zod/v4/locales/ms.cjs +142 -0
  700. package/node_modules/zod/v4/locales/ms.d.cts +4 -0
  701. package/node_modules/zod/v4/locales/ms.d.ts +4 -0
  702. package/node_modules/zod/v4/locales/ms.js +116 -0
  703. package/node_modules/zod/v4/locales/nl.cjs +143 -0
  704. package/node_modules/zod/v4/locales/nl.d.cts +4 -0
  705. package/node_modules/zod/v4/locales/nl.d.ts +4 -0
  706. package/node_modules/zod/v4/locales/nl.js +117 -0
  707. package/node_modules/zod/v4/locales/no.cjs +142 -0
  708. package/node_modules/zod/v4/locales/no.d.cts +4 -0
  709. package/node_modules/zod/v4/locales/no.d.ts +4 -0
  710. package/node_modules/zod/v4/locales/no.js +116 -0
  711. package/node_modules/zod/v4/locales/ota.cjs +143 -0
  712. package/node_modules/zod/v4/locales/ota.d.cts +4 -0
  713. package/node_modules/zod/v4/locales/ota.d.ts +4 -0
  714. package/node_modules/zod/v4/locales/ota.js +117 -0
  715. package/node_modules/zod/v4/locales/pl.cjs +143 -0
  716. package/node_modules/zod/v4/locales/pl.d.cts +4 -0
  717. package/node_modules/zod/v4/locales/pl.d.ts +4 -0
  718. package/node_modules/zod/v4/locales/pl.js +117 -0
  719. package/node_modules/zod/v4/locales/ps.cjs +148 -0
  720. package/node_modules/zod/v4/locales/ps.d.cts +4 -0
  721. package/node_modules/zod/v4/locales/ps.d.ts +4 -0
  722. package/node_modules/zod/v4/locales/ps.js +122 -0
  723. package/node_modules/zod/v4/locales/pt.cjs +142 -0
  724. package/node_modules/zod/v4/locales/pt.d.cts +4 -0
  725. package/node_modules/zod/v4/locales/pt.d.ts +4 -0
  726. package/node_modules/zod/v4/locales/pt.js +116 -0
  727. package/node_modules/zod/v4/locales/ru.cjs +190 -0
  728. package/node_modules/zod/v4/locales/ru.d.cts +4 -0
  729. package/node_modules/zod/v4/locales/ru.d.ts +4 -0
  730. package/node_modules/zod/v4/locales/ru.js +164 -0
  731. package/node_modules/zod/v4/locales/sl.cjs +143 -0
  732. package/node_modules/zod/v4/locales/sl.d.cts +4 -0
  733. package/node_modules/zod/v4/locales/sl.d.ts +4 -0
  734. package/node_modules/zod/v4/locales/sl.js +117 -0
  735. package/node_modules/zod/v4/locales/sv.cjs +144 -0
  736. package/node_modules/zod/v4/locales/sv.d.cts +4 -0
  737. package/node_modules/zod/v4/locales/sv.d.ts +4 -0
  738. package/node_modules/zod/v4/locales/sv.js +118 -0
  739. package/node_modules/zod/v4/locales/ta.cjs +143 -0
  740. package/node_modules/zod/v4/locales/ta.d.cts +4 -0
  741. package/node_modules/zod/v4/locales/ta.d.ts +4 -0
  742. package/node_modules/zod/v4/locales/ta.js +117 -0
  743. package/node_modules/zod/v4/locales/th.cjs +143 -0
  744. package/node_modules/zod/v4/locales/th.d.cts +4 -0
  745. package/node_modules/zod/v4/locales/th.d.ts +4 -0
  746. package/node_modules/zod/v4/locales/th.js +117 -0
  747. package/node_modules/zod/v4/locales/tr.cjs +143 -0
  748. package/node_modules/zod/v4/locales/tr.d.cts +5 -0
  749. package/node_modules/zod/v4/locales/tr.d.ts +5 -0
  750. package/node_modules/zod/v4/locales/tr.js +115 -0
  751. package/node_modules/zod/v4/locales/ua.cjs +143 -0
  752. package/node_modules/zod/v4/locales/ua.d.cts +4 -0
  753. package/node_modules/zod/v4/locales/ua.d.ts +4 -0
  754. package/node_modules/zod/v4/locales/ua.js +117 -0
  755. package/node_modules/zod/v4/locales/ur.cjs +143 -0
  756. package/node_modules/zod/v4/locales/ur.d.cts +4 -0
  757. package/node_modules/zod/v4/locales/ur.d.ts +4 -0
  758. package/node_modules/zod/v4/locales/ur.js +117 -0
  759. package/node_modules/zod/v4/locales/vi.cjs +142 -0
  760. package/node_modules/zod/v4/locales/vi.d.cts +4 -0
  761. package/node_modules/zod/v4/locales/vi.d.ts +4 -0
  762. package/node_modules/zod/v4/locales/vi.js +116 -0
  763. package/node_modules/zod/v4/locales/zh-CN.cjs +142 -0
  764. package/node_modules/zod/v4/locales/zh-CN.d.cts +4 -0
  765. package/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
  766. package/node_modules/zod/v4/locales/zh-CN.js +116 -0
  767. package/node_modules/zod/v4/locales/zh-TW.cjs +143 -0
  768. package/node_modules/zod/v4/locales/zh-TW.d.cts +4 -0
  769. package/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
  770. package/node_modules/zod/v4/locales/zh-TW.js +117 -0
  771. package/node_modules/zod/v4/mini/checks.cjs +34 -0
  772. package/node_modules/zod/v4/mini/checks.d.cts +1 -0
  773. package/node_modules/zod/v4/mini/checks.d.ts +1 -0
  774. package/node_modules/zod/v4/mini/checks.js +1 -0
  775. package/node_modules/zod/v4/mini/coerce.cjs +47 -0
  776. package/node_modules/zod/v4/mini/coerce.d.cts +7 -0
  777. package/node_modules/zod/v4/mini/coerce.d.ts +7 -0
  778. package/node_modules/zod/v4/mini/coerce.js +17 -0
  779. package/node_modules/zod/v4/mini/external.cjs +62 -0
  780. package/node_modules/zod/v4/mini/external.d.cts +11 -0
  781. package/node_modules/zod/v4/mini/external.d.ts +11 -0
  782. package/node_modules/zod/v4/mini/external.js +13 -0
  783. package/node_modules/zod/v4/mini/index.cjs +32 -0
  784. package/node_modules/zod/v4/mini/index.d.cts +3 -0
  785. package/node_modules/zod/v4/mini/index.d.ts +3 -0
  786. package/node_modules/zod/v4/mini/index.js +3 -0
  787. package/node_modules/zod/v4/mini/iso.cjs +60 -0
  788. package/node_modules/zod/v4/mini/iso.d.cts +22 -0
  789. package/node_modules/zod/v4/mini/iso.d.ts +22 -0
  790. package/node_modules/zod/v4/mini/iso.js +30 -0
  791. package/node_modules/zod/v4/mini/parse.cjs +8 -0
  792. package/node_modules/zod/v4/mini/parse.d.cts +1 -0
  793. package/node_modules/zod/v4/mini/parse.d.ts +1 -0
  794. package/node_modules/zod/v4/mini/parse.js +1 -0
  795. package/node_modules/zod/v4/mini/schemas.cjs +839 -0
  796. package/node_modules/zod/v4/mini/schemas.d.cts +356 -0
  797. package/node_modules/zod/v4/mini/schemas.d.ts +356 -0
  798. package/node_modules/zod/v4/mini/schemas.js +732 -0
  799. package/node_modules/zod/v4-mini/index.cjs +17 -0
  800. package/node_modules/zod/v4-mini/index.d.cts +1 -0
  801. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  802. package/node_modules/zod/v4-mini/index.js +1 -0
  803. package/package.json +100 -101
  804. package/dist/index-DXag5A9X.js +0 -1096
@@ -0,0 +1,2487 @@
1
+ /**
2
+ * @fileoverview 个人工作台区块、对话和快照协议类型定义。
3
+ * @author seadon
4
+ * @created 2026-05-06
5
+ */
6
+
7
+ import type { ProtocolConfigPayload, ProtocolDataPayload, RendererType } from './echartsProtocol';
8
+
9
+ export type RoleId =
10
+ | 'ceo'
11
+ | 'cfo'
12
+ | 'sales_leader'
13
+ | 'cto'
14
+ | 'it_admin'
15
+ | 'coo'
16
+ | 'chro'
17
+ | 'risk_leader'
18
+ | 'regional_gm';
19
+
20
+ export type IntentActionType = 'append' | 'prepend' | 'replace_target' | 'replace_all' | 'unknown';
21
+ export type IntentPlacement = 'top' | 'bottom' | 'before_target' | 'after_target';
22
+ export type IntentScope = 'single' | 'group' | 'all';
23
+ export type WorkbenchIntentChannel = 'card_generation' | 'card_patch' | 'answer' | 'submit';
24
+ export type SemanticOperation =
25
+ | 'generate_cards'
26
+ | 'patch_blocks'
27
+ | 'delete_card'
28
+ | 'clear_canvas'
29
+ | 'regenerate_target'
30
+ | 'regenerate_all'
31
+ | 'answer'
32
+ | 'submit'
33
+ | 'unknown';
34
+ export type CardPatchOperation =
35
+ | 'patch_attributes'
36
+ | 'patch_style'
37
+ | 'patch_echarts'
38
+ | 'patch_mixed'
39
+ | 'patch_common_style'
40
+ | 'delete_card'
41
+ | 'clear_canvas'
42
+ | 'regenerate_target'
43
+ | 'regenerate_all';
44
+ export type CardPatchEditMode = 'style' | 'content' | 'renderer' | 'layout' | 'data' | 'structure' | 'text';
45
+ export type CardMutationOperation =
46
+ | 'create_card'
47
+ | 'update_card'
48
+ | 'replace_card'
49
+ | 'delete_card'
50
+ | 'resize_card'
51
+ | 'reorder_card'
52
+ | 'clear_canvas'
53
+ | 'rollback_transaction';
54
+ export type MutationTransactionSource = 'ai_card' | 'manual_config' | 'system_layout';
55
+ export type MutationStepKind =
56
+ | 'create_block'
57
+ | 'update_style'
58
+ | 'update_content'
59
+ | 'update_renderer'
60
+ | 'update_layout'
61
+ | 'delete_block'
62
+ | 'expand_canvas'
63
+ | 'rollback_step';
64
+ export type AssistantPersonaKey = 'warm' | 'professional' | 'reserved';
65
+
66
+ export interface AssistantPersonaPayload {
67
+ key: AssistantPersonaKey;
68
+ label: string;
69
+ shortDescription: string;
70
+ prompt: string;
71
+ }
72
+
73
+ export type BlockType = 'display' | 'form' | 'survey' | 'action' | 'workflow' | 'report';
74
+
75
+ export type DisplaySubType =
76
+ | 'metric'
77
+ | 'chart'
78
+ | 'weather'
79
+ | 'calendar'
80
+ | 'table'
81
+ | 'ranking'
82
+ | 'insight'
83
+ | 'taskSummary'
84
+ | 'reportSummary'
85
+ | 'embed'
86
+ | 'fdeCustom'
87
+ | 'customCanvas';
88
+
89
+ export type FormSubType = 'inlineForm' | 'draftForm' | 'approvalForm' | 'exceptionForm';
90
+ export type SurveySubType = 'quickSurvey' | 'stepSurvey' | 'investigationSurvey';
91
+ export type ActionSubType = 'quickAction' | 'bulkAction' | 'automationTrigger';
92
+ export type WorkflowSubType = 'approvalFlow' | 'taskFlow' | 'timeline' | 'statusBoard';
93
+ export type ReportSubType = 'periodicReport' | 'boardPack' | 'managementBrief';
94
+
95
+ export type BlockSubType =
96
+ | DisplaySubType
97
+ | FormSubType
98
+ | SurveySubType
99
+ | ActionSubType
100
+ | WorkflowSubType
101
+ | ReportSubType;
102
+
103
+ export type BlockActionType =
104
+ | 'refresh'
105
+ | 'submit'
106
+ | 'execute'
107
+ | 'open'
108
+ | 'generate'
109
+ | 'assign'
110
+ | 'approve'
111
+ | 'reject'
112
+ | 'export';
113
+
114
+ export interface BlockLayout {
115
+ i: string;
116
+ x: number;
117
+ y: number;
118
+ w: number;
119
+ h: number;
120
+ minW?: number;
121
+ minH?: number;
122
+ maxW?: number;
123
+ maxH?: number;
124
+ static?: boolean;
125
+ }
126
+
127
+ export interface WorkbenchGridLayoutNode extends BlockLayout {
128
+ parentId?: string;
129
+ children?: WorkbenchGridLayoutNode[];
130
+ }
131
+
132
+ export interface WorkbenchLayoutV4 {
133
+ version: 4;
134
+ cols: number;
135
+ rowHeight?: number | 'auto';
136
+ gap: number;
137
+ meta?: Record<string, unknown>;
138
+ nodes: WorkbenchGridLayoutNode[];
139
+ }
140
+
141
+ export interface BlockIntent {
142
+ scene: string;
143
+ bizIntent: string;
144
+ roleTemplate: string;
145
+ }
146
+
147
+ export interface BlockSource {
148
+ sourceType: string;
149
+ service: string;
150
+ resourceKey: string;
151
+ params?: Record<string, unknown>;
152
+ }
153
+
154
+ export interface BlockRenderer {
155
+ engine: string;
156
+ rendererKey: string;
157
+ preset?: string;
158
+ displayMode?: string;
159
+ }
160
+
161
+ export interface BlockState {
162
+ mode: 'preview' | 'final';
163
+ status:
164
+ | 'loading'
165
+ | 'ready'
166
+ | 'error'
167
+ | 'draft'
168
+ | 'submitted'
169
+ | 'running'
170
+ | 'needs_confirmation'
171
+ | 'confirmed'
172
+ | 'executing'
173
+ | 'failed'
174
+ | 'cancelled';
175
+ refreshable: boolean;
176
+ cacheable: boolean;
177
+ drilldown?: boolean;
178
+ editable?: boolean;
179
+ submitable?: boolean;
180
+ }
181
+
182
+ export interface WorkbenchAction {
183
+ id: string;
184
+ actionType: BlockActionType | string;
185
+ label: string;
186
+ service?: string;
187
+ resourceKey?: string;
188
+ payloadTemplate?: Record<string, unknown>;
189
+ }
190
+
191
+ export interface IntentTargetSelector {
192
+ byId?: string[];
193
+ byTitle?: string[];
194
+ byTitleKeyword?: string[];
195
+ byBlockType?: BlockType[];
196
+ bySubType?: Array<BlockSubType | string>;
197
+ byBizIntent?: string[];
198
+ byTitleKeywords?: string[];
199
+ scope?: IntentScope;
200
+ }
201
+
202
+ export interface IntentConstraint {
203
+ placement?: IntentPlacement;
204
+ count?: number;
205
+ preferredLayout?: 'cards' | 'dashboard';
206
+ }
207
+
208
+ export interface IntentConfidence {
209
+ score: number;
210
+ matched: string[];
211
+ missing: string[];
212
+ }
213
+
214
+ export interface UserIntent {
215
+ rawUtterance: string;
216
+ literalObject?: string;
217
+ actualIntent?: string;
218
+ intentType?: string;
219
+ routeChannel?: WorkbenchIntentChannel;
220
+ selectedSkillId?: string;
221
+ operation?: SemanticOperation;
222
+ targetScope?: 'all' | 'selected' | 'named' | 'left_canvas' | 'current_workspace' | 'unknown';
223
+ safety?: {
224
+ riskLevel: 'low' | 'medium' | 'high';
225
+ requiresPreview: boolean;
226
+ requiresConfirmation: boolean;
227
+ reasons: string[];
228
+ };
229
+ analogyMode?: boolean;
230
+ domain?: 'enterprise_workbench' | 'outside_enterprise_workbench' | 'unknown';
231
+ requestedCapability?: string[];
232
+ contentIntent: string[];
233
+ actionType: IntentActionType;
234
+ targetSelector?: IntentTargetSelector;
235
+ runtimeCapabilityMutation?: RuntimeCapabilityMutation;
236
+ constraints?: IntentConstraint;
237
+ confidence: IntentConfidence;
238
+ }
239
+
240
+ export interface CanvasApplyAction {
241
+ type: Exclude<IntentActionType, 'unknown'> | 'noop';
242
+ scope: IntentScope;
243
+ placement?: IntentPlacement;
244
+ targetSelectors?: IntentTargetSelector[];
245
+ }
246
+
247
+ export interface CanvasApplyPolicy {
248
+ keepOrder: boolean;
249
+ reindexOrder: boolean;
250
+ keepPinnedBlocks?: boolean;
251
+ }
252
+
253
+ export interface WorkbenchDebugTrace {
254
+ rawUtterance: string;
255
+ userSemantics: string[];
256
+ requestedAction: string;
257
+ matchedCapabilities: string[];
258
+ missingCapabilities: string[];
259
+ nextSupportSuggestion: string[];
260
+ }
261
+
262
+ export type TurnTraceCategory = 'semantic' | 'proposal' | 'runtime';
263
+ export type ConversationTurnStatus =
264
+ | 'streaming'
265
+ | 'ready'
266
+ | 'preview_failed'
267
+ | 'insert_failed'
268
+ | 'submit_failed'
269
+ | 'submitted'
270
+ | 'error'
271
+ | 'cancelled'
272
+ | 'applied'
273
+ | 'reverted';
274
+ export type WorkbenchTurnMode = WorkbenchIntentChannel;
275
+ export type TraceBlockType = 'thought' | 'json' | 'code' | 'file_change' | 'summary';
276
+ export type TraceAttachmentType = 'json' | 'code' | 'file_change' | 'text';
277
+ export type WorklogStageText =
278
+ | '正在思考'
279
+ | '正在计划'
280
+ | '正在执行'
281
+ | '正在收尾'
282
+ // Legacy values may exist in persisted turns; new runtime code should not emit them.
283
+ | '正在读取'
284
+ | '正在回复'
285
+ | '正在展示'
286
+ | '正在生成预览'
287
+ | '等待确认'
288
+ ;
289
+ export type ConfirmationScope = 'layout' | 'preview' | 'insert' | 'patch' | 'submit' | 'execute' | 'high_risk_action';
290
+ export type ConfirmationStatus =
291
+ | 'draft'
292
+ | 'needs_confirmation'
293
+ | 'confirmed'
294
+ | 'executing'
295
+ | 'submitted'
296
+ | 'applied'
297
+ | 'failed'
298
+ | 'cancelled';
299
+
300
+ export interface ConversationTraceAttachment {
301
+ type: TraceAttachmentType;
302
+ title: string;
303
+ content: string;
304
+ collapsed?: boolean;
305
+ }
306
+
307
+ export interface ConversationConfirmation {
308
+ scope: ConfirmationScope;
309
+ status: ConfirmationStatus;
310
+ reason?: string;
311
+ summary?: string;
312
+ questions?: string[];
313
+ missingFields?: string[];
314
+ }
315
+
316
+ export type ConversationTaskKind =
317
+ | 'data_action'
318
+ | 'data_query'
319
+ | 'metric_query'
320
+ | 'attachment_analysis'
321
+ | 'approval_analysis'
322
+ | 'workbench_card'
323
+ | 'general_answer';
324
+
325
+ export type ConversationTaskStatus =
326
+ | 'intent_detected'
327
+ | 'collecting_fields'
328
+ | 'waiting_confirmation'
329
+ | 'confirmed'
330
+ | 'executing'
331
+ | 'success'
332
+ | 'failed'
333
+ | 'cancelled'
334
+ | 'topic_shifted';
335
+
336
+ export interface ConversationTaskField {
337
+ code: string;
338
+ name: string;
339
+ value?: unknown;
340
+ type?: string;
341
+ required?: boolean;
342
+ source?: string;
343
+ displayValue?: string;
344
+ }
345
+
346
+ export interface ConversationTaskError {
347
+ code?: string;
348
+ message: string;
349
+ retryable?: boolean;
350
+ }
351
+
352
+ export interface ConversationTaskClarificationOption {
353
+ index: number;
354
+ label: string;
355
+ description?: string;
356
+ appId?: string;
357
+ modelCode?: string;
358
+ metricCode?: string;
359
+ fieldCode?: string;
360
+ matchEvidence?: string;
361
+ score?: number;
362
+ source?: string;
363
+ }
364
+
365
+ export interface ConversationTaskState {
366
+ taskId: string;
367
+ turnId?: string;
368
+ conversationId?: string;
369
+ taskKind: ConversationTaskKind;
370
+ status: ConversationTaskStatus;
371
+ title: string;
372
+ fields?: ConversationTaskField[];
373
+ missingFields?: ConversationTaskField[];
374
+ confirmationRequired?: boolean;
375
+ allowedConfirmPhrases?: string[];
376
+ clarificationOptions?: ConversationTaskClarificationOption[];
377
+ confirmedSelection?: ConversationTaskClarificationOption;
378
+ executionScope?: {
379
+ tenantId?: string;
380
+ appId?: string;
381
+ };
382
+ lastError?: ConversationTaskError;
383
+ resultSummary?: string;
384
+ createdAt?: string;
385
+ updatedAt?: string;
386
+ payload?: Record<string, unknown>;
387
+ }
388
+
389
+ export interface PreviewLayoutItem extends BlockLayout {}
390
+
391
+ export interface LayoutDraftPlaceholderBlock {
392
+ id: string;
393
+ title: string;
394
+ role: 'primary' | 'secondary' | 'supporting';
395
+ suggestedType: string;
396
+ density: 'thumbnail' | 'compact' | 'standard' | 'expanded' | 'dashboard';
397
+ layout: PreviewLayoutItem;
398
+ placeholderText?: string;
399
+ }
400
+
401
+ export interface LayoutDraft {
402
+ draftId: string;
403
+ baseSnapshotVersion: number;
404
+ layoutConfig: LayoutConfig;
405
+ sourceTurnId: string;
406
+ status: 'draft' | 'needs_confirmation' | 'confirmed' | 'rejected' | 'superseded';
407
+ intentSummary: string;
408
+ layoutReasoning: string[];
409
+ constraints: {
410
+ hard: string[];
411
+ soft: string[];
412
+ };
413
+ placeholderBlocks: LayoutDraftPlaceholderBlock[];
414
+ conflicts?: Array<{
415
+ type: string;
416
+ message: string;
417
+ recoverable: boolean;
418
+ }>;
419
+ createdAt: string;
420
+ }
421
+
422
+ export interface PreviewSnapshotDraft {
423
+ draftId: string;
424
+ layoutDraftId?: string;
425
+ version?: number;
426
+ parentDraftId?: string;
427
+ supersedesDraftId?: string;
428
+ targetArtifactId?: string;
429
+ changeRequest?: string;
430
+ status?: 'draft' | 'preview_ready' | 'applied' | 'superseded' | 'failed';
431
+ baseSnapshotVersion: number;
432
+ layoutConfig: LayoutConfig;
433
+ nextBlocks: MaterializedBlock[];
434
+ changedBlockIds: string[];
435
+ insertedBlockIds: string[];
436
+ removedBlockIds: string[];
437
+ createdAt: string;
438
+ }
439
+
440
+ export interface ConversationGroupSummary {
441
+ id: string;
442
+ title: string;
443
+ updatedAt: string;
444
+ }
445
+
446
+ export interface ConversationTurnTraceItem {
447
+ id: string;
448
+ category: TurnTraceCategory;
449
+ title: string;
450
+ detail: string;
451
+ humanReadable: string;
452
+ status: 'done' | 'running' | 'info';
453
+ createdAt: string;
454
+ blockType?: TraceBlockType;
455
+ collapsed?: boolean;
456
+ attachments?: ConversationTraceAttachment[];
457
+ rawPayload?: string;
458
+ }
459
+
460
+ export type ConversationReturnKind =
461
+ | 'start'
462
+ | 'status'
463
+ | 'process'
464
+ | 'action'
465
+ | 'conclusion'
466
+ | 'data'
467
+ | 'preview'
468
+ | 'confirmation'
469
+ | 'error'
470
+ | 'debug'
471
+ | 'usage';
472
+
473
+ export type QueryTraceStage =
474
+ | 'question_understanding'
475
+ | 'memory_candidates'
476
+ | 'semantic_matching'
477
+ | 'clarification'
478
+ | 'query_planning'
479
+ | 'query_execution'
480
+ | 'conclusion_evidence';
481
+
482
+ export type QueryTraceVisibility =
483
+ | 'current_only'
484
+ | 'history_summary'
485
+ | 'technical_detail';
486
+
487
+ export interface QueryTraceMetric {
488
+ name: string;
489
+ definition?: string;
490
+ matchSource?: string;
491
+ source?: string;
492
+ score?: number;
493
+ }
494
+
495
+ export interface QueryTraceMatch extends QueryTraceMetric {}
496
+
497
+ export interface QueryTraceMemoryCandidate {
498
+ id?: string;
499
+ title: string;
500
+ content: string;
501
+ type?: string;
502
+ scope: string;
503
+ confidence: number;
504
+ layerPath: string[];
505
+ evidenceRefs: string[];
506
+ candidateOnly: boolean;
507
+ source?: string;
508
+ reason?: string;
509
+ }
510
+
511
+ export interface QueryTraceMemorySkipped {
512
+ id: string;
513
+ title: string;
514
+ reason: string;
515
+ }
516
+
517
+ export interface QueryTraceExecutionSummary {
518
+ rowCount: number;
519
+ fieldCount: number;
520
+ fields: string[];
521
+ keyStats: Array<{ label: string; value: string; evidenceRef?: string }>;
522
+ sampleRows: Array<Record<string, unknown>>;
523
+ limitations: string[];
524
+ }
525
+
526
+ export interface QueryTraceRelationScope {
527
+ primaryModels: string[];
528
+ lockedModels: string[];
529
+ relatedModels: string[];
530
+ joins: string[];
531
+ relationEdges: string[];
532
+ }
533
+
534
+ export type QueryTraceRelationDiagnosticActionKind =
535
+ | 'complete_field_mapping'
536
+ | 'complete_trusted_join'
537
+ | 'complete_field_inventory'
538
+ | 'confirm_model_scope'
539
+ | 'complete_metric_dimension';
540
+
541
+ export interface QueryTraceRelationDiagnosticAction {
542
+ kind: QueryTraceRelationDiagnosticActionKind;
543
+ label: string;
544
+ payload?: Record<string, unknown>;
545
+ }
546
+
547
+ export interface QueryTraceRelationDiagnostic {
548
+ code: string;
549
+ severity: 'info' | 'warn' | 'block';
550
+ message: string;
551
+ evidence?: string[];
552
+ suggestedAction?: string;
553
+ action?: QueryTraceRelationDiagnosticAction;
554
+ }
555
+
556
+ export interface QueryTraceMemoryCapturePrompt {
557
+ title: string;
558
+ content: string;
559
+ confirmLabel: string;
560
+ dismissLabel: string;
561
+ status: 'draft' | 'candidate_created' | 'dismissed';
562
+ }
563
+
564
+ export interface QueryTraceSemanticQueryIr {
565
+ ok?: boolean;
566
+ compiledSqlAvailable?: boolean;
567
+ compiledSqlHidden?: boolean;
568
+ rootModel?: string;
569
+ selectedModels?: string[];
570
+ selectedFields?: string[];
571
+ trustedJoins?: string[];
572
+ blockers?: string[];
573
+ limitations?: string[];
574
+ }
575
+
576
+ export interface QueryTraceDetails {
577
+ intent?: string;
578
+ memoryCandidates?: QueryTraceMemoryCandidate[];
579
+ memorySkipped?: QueryTraceMemorySkipped[];
580
+ memoryConflicts?: QueryTraceMemorySkipped[];
581
+ memoryCapturePrompt?: QueryTraceMemoryCapturePrompt;
582
+ metrics?: QueryTraceMetric[];
583
+ dimensions?: Array<string | QueryTraceMatch>;
584
+ filters?: Array<string | QueryTraceMatch>;
585
+ ontologyAssets?: string[];
586
+ ambiguities?: Array<{ field: string; options: string[]; reason: string }>;
587
+ queryLogic?: string[];
588
+ executionSummary?: QueryTraceExecutionSummary;
589
+ relationScope?: QueryTraceRelationScope;
590
+ relationDiagnostics?: QueryTraceRelationDiagnostic[];
591
+ semanticQueryIr?: QueryTraceSemanticQueryIr;
592
+ evidenceCards?: Array<{ id: string; title: string; summary: string; kind: 'data' | 'semantic' | 'limitation' }>;
593
+ technicalDetails?: Record<string, unknown>;
594
+ }
595
+
596
+ export interface QueryTracePayload {
597
+ stage: QueryTraceStage;
598
+ summary: string;
599
+ details: QueryTraceDetails;
600
+ evidenceRefs?: string[];
601
+ }
602
+
603
+ export type ConversationProcessStatus = 'running' | 'done' | 'error';
604
+ export type ConversationProcessCollapseSource = 'auto' | 'user';
605
+ export type ConversationProcessInvocationKind = 'tool' | 'skill';
606
+
607
+ export interface ConversationProcessInvocation {
608
+ id: string;
609
+ kind: ConversationProcessInvocationKind;
610
+ name: string;
611
+ title: string;
612
+ status: ConversationProcessStatus;
613
+ collapsed: boolean;
614
+ inputSummary?: string;
615
+ resultSummary?: string;
616
+ summary?: string;
617
+ durationMs?: number;
618
+ startedAt?: string;
619
+ completedAt?: string;
620
+ eventId?: string;
621
+ eventCode?: string;
622
+ technicalDetail?: Record<string, unknown>;
623
+ }
624
+
625
+ export interface ConversationProcessGroup {
626
+ id: string;
627
+ title: string;
628
+ summary?: string;
629
+ status: ConversationProcessStatus;
630
+ collapsed: boolean;
631
+ collapseSource?: ConversationProcessCollapseSource;
632
+ startedAt?: string;
633
+ completedAt?: string;
634
+ eventId?: string;
635
+ eventCode?: string;
636
+ invocations: ConversationProcessInvocation[];
637
+ }
638
+
639
+ export interface ConversationReturnItem {
640
+ id: string;
641
+ kind: ConversationReturnKind;
642
+ title: string;
643
+ summary: string;
644
+ createdAt: string;
645
+ status?: 'running' | 'done' | 'info' | 'error';
646
+ collapsed?: boolean;
647
+ payloadLabel?: string;
648
+ payload?: unknown;
649
+ eventId?: string;
650
+ eventCode?: string;
651
+ seq?: number;
652
+ phase?: ProductStreamPhase;
653
+ intent?: WorkbenchIntentChannel;
654
+ parentEventId?: string;
655
+ streamType?: 'process' | 'action' | 'artifact' | 'final' | 'usage';
656
+ streamDone?: boolean;
657
+ traceStage?: QueryTraceStage;
658
+ traceVisibility?: QueryTraceVisibility;
659
+ queryTrace?: QueryTracePayload;
660
+ technicalDetail?: Record<string, unknown>;
661
+ }
662
+
663
+ export interface StreamActionItem {
664
+ id: string;
665
+ eventId?: string;
666
+ eventCode?: string;
667
+ seq: number;
668
+ phase?: ProductStreamPhase;
669
+ title: string;
670
+ detail?: string;
671
+ tool?: string;
672
+ status: 'running' | 'done' | 'error' | 'info';
673
+ durationMs?: number;
674
+ technicalDetail?: Record<string, unknown>;
675
+ createdAt: string;
676
+ }
677
+
678
+ export interface ConversationTurn {
679
+ id: string;
680
+ conversationId?: string;
681
+ title?: string;
682
+ mode: WorkbenchTurnMode;
683
+ intentChannel: WorkbenchIntentChannel;
684
+ userPrompt: string;
685
+ assistantStreamingText: string;
686
+ assistantFinalText: string;
687
+ assistantConclusion: string;
688
+ planResult?: PlanResponse;
689
+ layoutDraft?: LayoutDraft;
690
+ previewDraft?: PreviewSnapshotDraft;
691
+ rollbackSnapshot?: WorkbenchSnapshot;
692
+ mutationTransaction?: MutationTransaction;
693
+ traceItems: ConversationTurnTraceItem[];
694
+ returnItems: ConversationReturnItem[];
695
+ streamActions?: StreamActionItem[];
696
+ confirmation?: ConversationConfirmation;
697
+ taskStates?: ConversationTaskState[];
698
+ worklogStartedAt?: string;
699
+ worklogEndedAt?: string;
700
+ worklogStageText?: WorklogStageText;
701
+ worklogStageDetail?: string;
702
+ worklogStageVisible?: boolean;
703
+ worklogCollapsed?: boolean;
704
+ finalContentVisible?: boolean;
705
+ pendingPatch?: PendingWorkbenchPatch | null;
706
+ processCollapsed?: boolean;
707
+ processCollapseSource?: ConversationProcessCollapseSource;
708
+ processGroups?: ConversationProcessGroup[];
709
+ status: ConversationTurnStatus;
710
+ createdAt: string;
711
+ updatedAt: string;
712
+ error?: string;
713
+ suppressErrorDisplay?: boolean;
714
+ collapsed?: boolean;
715
+ }
716
+
717
+ export type CardDataTaskStatus =
718
+ | 'pending'
719
+ | 'querying'
720
+ | 'confirming'
721
+ | 'empty'
722
+ | 'bound'
723
+ | 'failed'
724
+ | 'config_required';
725
+
726
+ export type CardDataTaskConfirmationType =
727
+ | 'semantic_model'
728
+ | 'join_path'
729
+ | 'metric_subject'
730
+ | 'filter';
731
+
732
+ export interface WorkbenchCardDataTaskState {
733
+ taskId: string;
734
+ conversationId?: string;
735
+ workspaceId?: string;
736
+ capabilityId: string;
737
+ rendererKey?: string;
738
+ dataShape?: string;
739
+ title?: string;
740
+ businessQuestion: string;
741
+ status: CardDataTaskStatus;
742
+ targetBlockId?: string;
743
+ confirmationPayload?: Record<string, unknown>;
744
+ error?: { code: string; message: string };
745
+ updatedAt: string;
746
+ }
747
+
748
+ export type CardDataTaskEvent =
749
+ | {
750
+ type: 'card_data_task_started';
751
+ turnId: string;
752
+ taskId: string;
753
+ capabilityId: string;
754
+ title?: string;
755
+ targetBlockId?: string;
756
+ status: 'pending';
757
+ }
758
+ | {
759
+ type: 'card_data_task_progress';
760
+ turnId: string;
761
+ taskId: string;
762
+ stage: 'semantic' | 'sql_plan' | 'execute' | 'project';
763
+ status: 'querying';
764
+ summary?: string;
765
+ }
766
+ | {
767
+ type: 'card_data_task_confirmation';
768
+ turnId: string;
769
+ taskId: string;
770
+ confirmationType: CardDataTaskConfirmationType;
771
+ options: Array<Record<string, unknown>>;
772
+ status: 'confirming';
773
+ message?: string;
774
+ }
775
+ | {
776
+ type: 'card_data_task_empty';
777
+ turnId: string;
778
+ taskId: string;
779
+ reason: string;
780
+ evidence?: Record<string, unknown>;
781
+ status: 'empty';
782
+ }
783
+ | {
784
+ type: 'card_data_task_bound';
785
+ turnId: string;
786
+ taskId: string;
787
+ blockId: string;
788
+ changedBlockIds: string[];
789
+ status: 'bound';
790
+ }
791
+ | {
792
+ type: 'card_data_task_config_required';
793
+ turnId: string;
794
+ taskId: string;
795
+ reason: string;
796
+ status: 'config_required';
797
+ }
798
+ | {
799
+ type: 'card_data_task_failed';
800
+ turnId: string;
801
+ taskId: string;
802
+ reason: string;
803
+ retryable: boolean;
804
+ status: 'failed';
805
+ };
806
+
807
+ export type PlanningDisplayStepKind =
808
+ | 'understanding'
809
+ | 'asset_selection'
810
+ | 'execution_plan'
811
+ | 'policy_guard'
812
+ | 'execution_status';
813
+
814
+ export interface PlanningDisplayStep {
815
+ kind: PlanningDisplayStepKind;
816
+ title: string;
817
+ summary: string;
818
+ items?: string[];
819
+ status?: 'running' | 'done' | 'warning' | 'blocked' | 'info';
820
+ }
821
+
822
+ export interface PlanningDisplayIssue {
823
+ severity: 'info' | 'warning' | 'blocked';
824
+ message: string;
825
+ }
826
+
827
+ export interface PlanningDisplayPayload {
828
+ summary: string;
829
+ routeLabel: string;
830
+ steps: PlanningDisplayStep[];
831
+ issues?: PlanningDisplayIssue[];
832
+ }
833
+
834
+ export interface PlanningAgentPlanStreamEvent {
835
+ type: 'planning.agent_plan';
836
+ turnId: string;
837
+ planId: string;
838
+ goalType: string;
839
+ userGoal: string;
840
+ confidence: number;
841
+ display?: PlanningDisplayPayload;
842
+ createdAt: string;
843
+ }
844
+
845
+ export interface PlanningPolicyGuardStreamEvent {
846
+ type: 'planning.policy_guard';
847
+ turnId: string;
848
+ planId: string;
849
+ allowed: boolean;
850
+ reason: string;
851
+ requiresUserConfirmation: boolean;
852
+ display?: PlanningDisplayPayload;
853
+ createdAt: string;
854
+ }
855
+
856
+ export type WorkbenchPlanStreamEvent =
857
+ | PlanningAgentPlanStreamEvent
858
+ | PlanningPolicyGuardStreamEvent
859
+ | CardDataTaskEvent
860
+ | {
861
+ type: 'turn_started';
862
+ turnId: string;
863
+ conversationId?: string;
864
+ title?: string;
865
+ userPrompt: string;
866
+ createdAt: string;
867
+ }
868
+ | {
869
+ type: 'process.line';
870
+ turnId: string;
871
+ seq: number;
872
+ text: string;
873
+ phase?: ProductStreamPhase;
874
+ eventCode?: string;
875
+ eventId?: string;
876
+ createdAt: string;
877
+ }
878
+ | {
879
+ type: 'status.pulse';
880
+ turnId: string;
881
+ seq?: number;
882
+ stageText: WorklogStageText;
883
+ text?: string;
884
+ phase?: ProductStreamPhase;
885
+ eventCode?: string;
886
+ eventId?: string;
887
+ createdAt?: string;
888
+ }
889
+ | {
890
+ type: 'action.started' | 'action.done' | 'action.failed';
891
+ turnId: string;
892
+ seq: number;
893
+ title: string;
894
+ detail?: string;
895
+ tool?: string;
896
+ durationMs?: number;
897
+ phase?: ProductStreamPhase;
898
+ eventCode?: string;
899
+ eventId?: string;
900
+ technicalDetail?: Record<string, unknown>;
901
+ createdAt: string;
902
+ }
903
+ | {
904
+ type: 'final.delta';
905
+ turnId: string;
906
+ seq: number;
907
+ markdownDelta: string;
908
+ deltaIndex?: number;
909
+ isFinalDelta?: boolean;
910
+ phase?: ProductStreamPhase;
911
+ eventCode?: string;
912
+ eventId?: string;
913
+ createdAt: string;
914
+ }
915
+ | {
916
+ type: 'usage';
917
+ turnId: string;
918
+ seq: number;
919
+ durationMs: number;
920
+ inputTokens?: number;
921
+ outputTokens?: number;
922
+ summary: string;
923
+ phase?: ProductStreamPhase;
924
+ eventCode?: string;
925
+ eventId?: string;
926
+ createdAt: string;
927
+ }
928
+ | {
929
+ type: 'assistant_delta';
930
+ turnId: string;
931
+ target?: 'conclusion';
932
+ delta: string;
933
+ }
934
+ | {
935
+ type: 'stream_message';
936
+ turnId: string;
937
+ item: ConversationReturnItem;
938
+ }
939
+ | {
940
+ type: 'plan_ready';
941
+ turnId: string;
942
+ planResult: PlanResponse;
943
+ }
944
+ | {
945
+ type: 'patch_plan_ready';
946
+ turnId: string;
947
+ patchPlan: PatchPlan;
948
+ highlightBlockIds?: string[];
949
+ candidateBlockIds?: string[];
950
+ error?: CardPatchErrorPayload;
951
+ suggestions?: CardPatchSuggestion[];
952
+ }
953
+ | {
954
+ type: 'card_recommendations_ready';
955
+ turnId: string;
956
+ message: string;
957
+ recommendations: Array<Record<string, unknown>>;
958
+ }
959
+ | {
960
+ type: 'registered_card_insert_ready';
961
+ turnId: string;
962
+ sourceTurnId?: string;
963
+ question?: string;
964
+ userInstruction?: string;
965
+ capabilityId: string;
966
+ title: string;
967
+ reason?: string;
968
+ confidence?: number;
969
+ dataShape?: string;
970
+ blockPlan: Record<string, unknown>;
971
+ dataBinding?: Record<string, unknown>;
972
+ queryResult?: Record<string, unknown>;
973
+ }
974
+ | {
975
+ type: 'query_result_export_ready';
976
+ turnId: string;
977
+ title: string;
978
+ formats: string[];
979
+ files: Array<{
980
+ format: string;
981
+ filename: string;
982
+ mimeType: string;
983
+ content: string;
984
+ encoding: 'utf8' | 'base64';
985
+ size?: number;
986
+ }>;
987
+ sourceQuestion?: string;
988
+ rowCount?: number;
989
+ }
990
+ | {
991
+ type: 'layout_draft_ready';
992
+ turnId: string;
993
+ layoutDraft: LayoutDraft;
994
+ }
995
+ | {
996
+ type: 'preview_ready';
997
+ turnId: string;
998
+ previewDraft: PreviewSnapshotDraft;
999
+ }
1000
+ | {
1001
+ type: 'snapshot_updated';
1002
+ turnId: string;
1003
+ snapshot: WorkbenchSnapshot;
1004
+ reason?: string;
1005
+ changedBlockIds?: string[];
1006
+ mutationTransaction?: MutationTransaction;
1007
+ highlightBlockIds?: string[];
1008
+ }
1009
+ | {
1010
+ type: 'trace';
1011
+ turnId: string;
1012
+ traceItem: ConversationTurnTraceItem;
1013
+ }
1014
+ | {
1015
+ type: 'needs_confirmation';
1016
+ turnId: string;
1017
+ confirmation: ConversationConfirmation;
1018
+ candidateBlockIds?: string[];
1019
+ }
1020
+ | {
1021
+ type: 'confirmation_result';
1022
+ turnId: string;
1023
+ result: ConversationConfirmation;
1024
+ }
1025
+ | ({
1026
+ type: 'task_state';
1027
+ turnId: string;
1028
+ } & ConversationTaskState)
1029
+ | {
1030
+ type: 'preview_failed';
1031
+ turnId: string;
1032
+ message: string;
1033
+ retryable?: boolean;
1034
+ }
1035
+ | {
1036
+ type: 'insert_failed';
1037
+ turnId: string;
1038
+ message: string;
1039
+ retryable?: boolean;
1040
+ }
1041
+ | {
1042
+ type: 'submit_failed';
1043
+ turnId: string;
1044
+ message: string;
1045
+ retryable?: boolean;
1046
+ draftPreserved?: boolean;
1047
+ }
1048
+ | {
1049
+ type: 'done';
1050
+ turnId: string;
1051
+ }
1052
+ | {
1053
+ type: 'error';
1054
+ turnId: string;
1055
+ message?: string;
1056
+ error?: {
1057
+ code?: string;
1058
+ message?: string;
1059
+ [key: string]: unknown;
1060
+ };
1061
+ stage?: string;
1062
+ retryable?: boolean;
1063
+ };
1064
+
1065
+ export interface UnsupportedIntentCase {
1066
+ rawUtterance: string;
1067
+ unresolvedAction?: string;
1068
+ unresolvedTarget?: string;
1069
+ unresolvedConstraint?: string;
1070
+ suggestion: string;
1071
+ }
1072
+
1073
+ export interface WorkbenchMutationPlan {
1074
+ userIntent: UserIntent;
1075
+ blockPlans: BlockPlan[];
1076
+ canvasAction: CanvasApplyAction;
1077
+ applyPolicy: CanvasApplyPolicy;
1078
+ debug: WorkbenchDebugTrace;
1079
+ }
1080
+
1081
+ export interface CanvasMutationResult {
1082
+ nextBlocks: MaterializedBlock[];
1083
+ replacedBlockIds: string[];
1084
+ insertedBlockIds: string[];
1085
+ removedBlockIds: string[];
1086
+ }
1087
+
1088
+ export interface MetricSummaryData {
1089
+ shape: 'metricSummary';
1090
+ primaryLabel: string;
1091
+ primaryFormat: 'currency' | 'number' | 'percent';
1092
+ primaryValue: number;
1093
+ deltaPct: number | null;
1094
+ compareLabel: string;
1095
+ periodLabel: string;
1096
+ sourceLabel: string;
1097
+ secondary: Array<{
1098
+ label: string;
1099
+ format: 'currency' | 'number' | 'percent';
1100
+ value: number;
1101
+ }>;
1102
+ }
1103
+
1104
+ export interface MultiSeriesData {
1105
+ shape: 'singleSeries' | 'multiSeries';
1106
+ categories: string[];
1107
+ metricFormat: 'currency' | 'number' | 'percent';
1108
+ unit?: string;
1109
+ series: Array<{
1110
+ name: string;
1111
+ type: 'bar' | 'line';
1112
+ colorBy?: 'series' | 'data';
1113
+ itemStyle?: {
1114
+ color?: string;
1115
+ };
1116
+ data: number[];
1117
+ }>;
1118
+ narrative?: string;
1119
+ }
1120
+
1121
+ export interface PieSlicesData {
1122
+ shape: 'pieSlices';
1123
+ unit?: string;
1124
+ innerRadius?: number;
1125
+ slices: Array<{
1126
+ label: string;
1127
+ value: number;
1128
+ share: number;
1129
+ }>;
1130
+ narrative?: string;
1131
+ }
1132
+
1133
+ export interface RadarMetricsData {
1134
+ shape: 'radarMetrics';
1135
+ max: number;
1136
+ axes: Array<{
1137
+ label: string;
1138
+ value: number;
1139
+ }>;
1140
+ narrative?: string;
1141
+ }
1142
+
1143
+ export interface ScatterPointsData {
1144
+ shape: 'scatterPoints';
1145
+ xLabel: string;
1146
+ yLabel: string;
1147
+ sizeLabel?: string;
1148
+ points: Array<{
1149
+ label: string;
1150
+ x: number;
1151
+ y: number;
1152
+ size?: number;
1153
+ category?: string;
1154
+ }>;
1155
+ narrative?: string;
1156
+ }
1157
+
1158
+ export interface FunnelStagesData {
1159
+ shape: 'funnelStages';
1160
+ unit?: string;
1161
+ stages: Array<{
1162
+ label: string;
1163
+ value: number;
1164
+ rate: number;
1165
+ }>;
1166
+ narrative?: string;
1167
+ }
1168
+
1169
+ export interface GaugeMetricData {
1170
+ shape: 'gaugeMetric';
1171
+ label: string;
1172
+ value: number;
1173
+ max: number;
1174
+ unit?: string;
1175
+ thresholds: Array<{
1176
+ label: string;
1177
+ value: number;
1178
+ color: string;
1179
+ }>;
1180
+ narrative?: string;
1181
+ }
1182
+
1183
+ export interface MapRegionsData {
1184
+ shape: 'mapRegions';
1185
+ unit?: string;
1186
+ regions: Array<{
1187
+ name: string;
1188
+ value: number;
1189
+ status: 'high' | 'medium' | 'low';
1190
+ }>;
1191
+ narrative?: string;
1192
+ }
1193
+
1194
+ export interface SankeyFlowData {
1195
+ shape: 'sankeyFlow';
1196
+ nodes: Array<{
1197
+ id: string;
1198
+ label: string;
1199
+ }>;
1200
+ links: Array<{
1201
+ source: string;
1202
+ target: string;
1203
+ value: number;
1204
+ }>;
1205
+ narrative?: string;
1206
+ }
1207
+
1208
+ export interface TreeNodeData {
1209
+ id: string;
1210
+ label: string;
1211
+ value?: number;
1212
+ children?: TreeNodeData[];
1213
+ }
1214
+
1215
+ export interface TreeHierarchyData {
1216
+ shape: 'treeHierarchy';
1217
+ root: TreeNodeData;
1218
+ narrative?: string;
1219
+ }
1220
+
1221
+ export interface GanttTasksData {
1222
+ shape: 'ganttTasks';
1223
+ timeline: string[];
1224
+ tasks: Array<{
1225
+ label: string;
1226
+ owner: string;
1227
+ start: number;
1228
+ end: number;
1229
+ status: 'done' | 'running' | 'pending' | 'risk';
1230
+ }>;
1231
+ narrative?: string;
1232
+ }
1233
+
1234
+ export interface CandlestickSeriesData {
1235
+ shape: 'candlestickSeries';
1236
+ categories: string[];
1237
+ unit?: string;
1238
+ values: Array<{
1239
+ open: number;
1240
+ close: number;
1241
+ low: number;
1242
+ high: number;
1243
+ }>;
1244
+ narrative?: string;
1245
+ }
1246
+
1247
+ export interface BoxplotSeriesData {
1248
+ shape: 'boxplotSeries';
1249
+ categories: string[];
1250
+ values: Array<[number, number, number, number, number]>;
1251
+ narrative?: string;
1252
+ }
1253
+
1254
+ export interface ParetoSeriesData {
1255
+ shape: 'paretoSeries';
1256
+ categories: string[];
1257
+ bars: number[];
1258
+ cumulative: number[];
1259
+ narrative?: string;
1260
+ }
1261
+
1262
+ export interface NetworkGraphData {
1263
+ shape: 'networkGraph';
1264
+ nodes: Array<{
1265
+ id: string;
1266
+ label: string;
1267
+ category?: string;
1268
+ value?: number;
1269
+ }>;
1270
+ links: Array<{
1271
+ source: string;
1272
+ target: string;
1273
+ value?: number;
1274
+ }>;
1275
+ narrative?: string;
1276
+ }
1277
+
1278
+ export interface GeoGlobeData {
1279
+ shape: 'geoGlobe';
1280
+ title: string;
1281
+ centerLabel: string;
1282
+ arcs: Array<{
1283
+ from: string;
1284
+ to: string;
1285
+ value: number;
1286
+ }>;
1287
+ metrics: Array<{
1288
+ label: string;
1289
+ value: string;
1290
+ }>;
1291
+ narrative?: string;
1292
+ }
1293
+
1294
+ export interface WaterfallStepsData {
1295
+ shape: 'waterfallSteps';
1296
+ unit: string;
1297
+ steps: Array<{
1298
+ label: string;
1299
+ value?: number;
1300
+ delta?: number;
1301
+ }>;
1302
+ narrative?: string;
1303
+ }
1304
+
1305
+ export interface HeatmapMatrixData {
1306
+ shape: 'heatmapMatrix';
1307
+ rows: string[];
1308
+ columns: string[];
1309
+ values: number[][];
1310
+ narrative?: string;
1311
+ }
1312
+
1313
+ export interface EchartsOptionData {
1314
+ shape: 'echartsOption';
1315
+ engine?: 'echarts' | 'echarts-gl';
1316
+ requires?: string[];
1317
+ theme?: string;
1318
+ option: Record<string, unknown>;
1319
+ narrative?: string;
1320
+ }
1321
+
1322
+ export interface EchartsScriptData {
1323
+ shape: 'echartsScript';
1324
+ engine?: 'echarts' | 'echarts-gl';
1325
+ requires?: string[];
1326
+ theme?: string;
1327
+ rootPath?: string;
1328
+ script: string;
1329
+ narrative?: string;
1330
+ }
1331
+
1332
+ export interface EchartsDynamicData {
1333
+ shape: 'echartsDynamic';
1334
+ optionTemplate: Record<string, unknown>;
1335
+ dataBinding: {
1336
+ bindingId: string;
1337
+ refreshApi: string;
1338
+ xField?: string;
1339
+ yFields?: string[];
1340
+ paramsSchema?: Record<string, unknown>;
1341
+ fieldMapping?: {
1342
+ xField?: string;
1343
+ yFields?: string[];
1344
+ };
1345
+ };
1346
+ narrative?: string;
1347
+ }
1348
+
1349
+ export interface DashboardGridData {
1350
+ shape: 'dashboardGrid';
1351
+ sourceLabel: string;
1352
+ narrative: string;
1353
+ panels: Array<{
1354
+ id: string;
1355
+ title: string;
1356
+ subtitle?: string;
1357
+ rendererKey: string;
1358
+ data: DisplayBlockData;
1359
+ }>;
1360
+ }
1361
+
1362
+ export interface CategoryRankingData {
1363
+ shape: 'categoryRanking';
1364
+ dimensionLabel: string;
1365
+ valueFormat: 'currency' | 'number';
1366
+ items: Array<{
1367
+ label: string;
1368
+ value: number;
1369
+ share: number;
1370
+ badge?: string;
1371
+ }>;
1372
+ }
1373
+
1374
+ export interface TableRowsData {
1375
+ shape: 'rows';
1376
+ visualKind?: string;
1377
+ sourceLabel?: string;
1378
+ columns: string[];
1379
+ rows: Array<{
1380
+ id: string;
1381
+ cells: string[];
1382
+ }>;
1383
+ }
1384
+
1385
+ export interface InsightNarrativeData {
1386
+ shape: 'insightNarrative';
1387
+ bullets: string[];
1388
+ confidence?: number;
1389
+ owner?: string;
1390
+ }
1391
+
1392
+ export interface TaskSummaryData {
1393
+ shape: 'taskSummary';
1394
+ total: number;
1395
+ overdue: number;
1396
+ dueToday: number;
1397
+ completed: number;
1398
+ sourceLabel: string;
1399
+ items: Array<{
1400
+ id: string;
1401
+ title: string;
1402
+ type: 'form' | 'survey' | 'notice' | 'document' | 'workflow' | 'custom';
1403
+ status: 'pending' | 'reading' | 'submitted' | 'overdue' | 'done';
1404
+ dueAt?: string;
1405
+ owner?: string;
1406
+ source?: string;
1407
+ entryLabel?: string;
1408
+ }>;
1409
+ }
1410
+
1411
+ export interface WeatherCurrentData {
1412
+ shape: 'weatherCurrent';
1413
+ location: string;
1414
+ observedAt: string;
1415
+ condition: 'sunny' | 'cloudy' | 'overcast' | 'rain' | 'snow' | 'storm' | 'unknown';
1416
+ conditionLabel: string;
1417
+ temperatureC: number | null;
1418
+ feelsLikeC?: number | null;
1419
+ humidityPct?: number | null;
1420
+ precipitationPct?: number | null;
1421
+ wind?: {
1422
+ direction: string;
1423
+ level: string;
1424
+ speedKph?: number | null;
1425
+ };
1426
+ aqi?: {
1427
+ value: number | null;
1428
+ level: string;
1429
+ };
1430
+ forecast: Array<{
1431
+ label: string;
1432
+ conditionLabel: string;
1433
+ highC: number | null;
1434
+ lowC: number | null;
1435
+ precipitationPct?: number | null;
1436
+ }>;
1437
+ sourceLabel: string;
1438
+ dataStatus: 'live' | 'sample' | 'unavailable';
1439
+ notice?: string;
1440
+ }
1441
+
1442
+ export interface CalendarCardData {
1443
+ shape: 'calendarCard';
1444
+ timezone: string;
1445
+ today: string;
1446
+ dateLabel: string;
1447
+ weekLabel: string;
1448
+ lunarLabel?: string;
1449
+ items: Array<{
1450
+ id: string;
1451
+ title: string;
1452
+ time: string;
1453
+ type: 'meeting' | 'deadline' | 'todo' | 'holiday' | 'reminder';
1454
+ status: 'scheduled' | 'due' | 'done' | 'sample';
1455
+ }>;
1456
+ sourceLabel: string;
1457
+ dataStatus: 'live' | 'sample' | 'unavailable';
1458
+ notice?: string;
1459
+ }
1460
+
1461
+ export interface ReportSummaryDisplayData {
1462
+ shape: 'reportSummary';
1463
+ summary: string;
1464
+ highlights: string[];
1465
+ sourceLabel: string;
1466
+ dataStatus: 'generated' | 'sample' | 'unavailable';
1467
+ }
1468
+
1469
+ export interface EmbeddedFrameData {
1470
+ shape: 'embeddedFrame';
1471
+ title: string;
1472
+ srcUrl: string;
1473
+ sandbox: string;
1474
+ status: 'ready' | 'missing_url' | 'blocked';
1475
+ sourceLabel: string;
1476
+ fallbackText?: string;
1477
+ }
1478
+
1479
+ export interface FdeCustomComponentData {
1480
+ shape: 'fdeCustomComponent';
1481
+ componentRef: string;
1482
+ componentName: string;
1483
+ props: Record<string, unknown>;
1484
+ status: 'ready' | 'unregistered';
1485
+ sourceLabel: string;
1486
+ fallbackText?: string;
1487
+ }
1488
+
1489
+ export interface CustomCanvasElement {
1490
+ id: string;
1491
+ kind: 'text' | 'metric' | 'badge' | 'divider';
1492
+ label?: string;
1493
+ value?: string;
1494
+ x?: number;
1495
+ y?: number;
1496
+ w?: number;
1497
+ h?: number;
1498
+ style?: Record<string, unknown>;
1499
+ }
1500
+
1501
+ export interface CustomCanvasNestedBlock {
1502
+ id: string;
1503
+ title: string;
1504
+ kind: string;
1505
+ capabilityId?: string;
1506
+ dataShape?: string;
1507
+ registryTitle?: string;
1508
+ visualKind?: string;
1509
+ meta?: Record<string, unknown>;
1510
+ slot: string;
1511
+ composeSource?: string;
1512
+ dataBindingId?: string;
1513
+ dataBinding?: {
1514
+ id?: string;
1515
+ bindingId?: string;
1516
+ status?: string;
1517
+ queryIntent?: string;
1518
+ refreshApi?: string;
1519
+ [key: string]: unknown;
1520
+ };
1521
+ dataBindingStatus: string;
1522
+ dataBindingError?: string;
1523
+ humanIntervention?: Record<string, unknown>;
1524
+ queryIntent?: string;
1525
+ subType?: BlockSubType | string;
1526
+ renderer?: BlockRenderer;
1527
+ state?: BlockState;
1528
+ layout?: BlockLayout;
1529
+ visual?: BlockVisualOptions;
1530
+ data?: Record<string, unknown>;
1531
+ }
1532
+
1533
+ export interface CustomCanvasData {
1534
+ shape: 'customCanvas';
1535
+ sourceLabel: string;
1536
+ containerRole?: string;
1537
+ background?: string;
1538
+ narrative?: string;
1539
+ elements: CustomCanvasElement[];
1540
+ nestedBlocks?: CustomCanvasNestedBlock[];
1541
+ nestedLayoutMode?: 'absolute' | 'grid' | string;
1542
+ nestedLayoutBasis?: {
1543
+ baseCols?: number;
1544
+ x?: number;
1545
+ y?: number;
1546
+ w?: number;
1547
+ h?: number;
1548
+ };
1549
+ nestedLayoutStacks?: Array<{
1550
+ id: string;
1551
+ childIds: string[];
1552
+ }>;
1553
+ nestedLayoutItems?: Record<string, {
1554
+ rowSpan?: number;
1555
+ columnSpan?: number;
1556
+ }>;
1557
+ }
1558
+
1559
+ /** 协议渲染数据 -- 通用卡片协议驱动 */
1560
+ export interface ProtocolRenderData {
1561
+ shape: 'protocolRender';
1562
+ rendererType: RendererType;
1563
+ protocolConfig: ProtocolConfigPayload;
1564
+ protocolData?: ProtocolDataPayload;
1565
+ dataBindingId?: string;
1566
+ dataBinding?: {
1567
+ bindingId?: string;
1568
+ refreshApi?: string;
1569
+ xField?: string;
1570
+ yFields?: string[];
1571
+ status?: string;
1572
+ params?: Record<string, unknown>;
1573
+ sourceType?: string;
1574
+ paramsSchema?: Record<string, unknown>;
1575
+ fieldMapping?: {
1576
+ xField?: string;
1577
+ yFields?: string[];
1578
+ };
1579
+ };
1580
+ }
1581
+
1582
+ export type DisplayBlockData =
1583
+ | MetricSummaryData
1584
+ | MultiSeriesData
1585
+ | PieSlicesData
1586
+ | RadarMetricsData
1587
+ | ScatterPointsData
1588
+ | FunnelStagesData
1589
+ | GaugeMetricData
1590
+ | MapRegionsData
1591
+ | SankeyFlowData
1592
+ | TreeHierarchyData
1593
+ | GanttTasksData
1594
+ | CandlestickSeriesData
1595
+ | BoxplotSeriesData
1596
+ | ParetoSeriesData
1597
+ | NetworkGraphData
1598
+ | GeoGlobeData
1599
+ | WaterfallStepsData
1600
+ | HeatmapMatrixData
1601
+ | EchartsOptionData
1602
+ | EchartsScriptData
1603
+ | EchartsDynamicData
1604
+ | DashboardGridData
1605
+ | CategoryRankingData
1606
+ | TableRowsData
1607
+ | InsightNarrativeData
1608
+ | TaskSummaryData
1609
+ | WeatherCurrentData
1610
+ | CalendarCardData
1611
+ | ReportSummaryDisplayData
1612
+ | EmbeddedFrameData
1613
+ | FdeCustomComponentData
1614
+ | CustomCanvasData
1615
+ | ProtocolRenderData;
1616
+
1617
+ export interface FormField {
1618
+ id: string;
1619
+ type: 'select' | 'currency' | 'textarea' | 'number' | 'text' | 'date' | 'user' | 'file';
1620
+ label: string;
1621
+ required?: boolean;
1622
+ options?: string[];
1623
+ placeholder?: string;
1624
+ }
1625
+
1626
+ export interface FormBlockData {
1627
+ schemaRef: string;
1628
+ draftRef: string;
1629
+ fields: FormField[];
1630
+ values: Record<string, unknown>;
1631
+ status: 'draft' | 'submitted';
1632
+ lastSavedAt?: string;
1633
+ submittedAt?: string;
1634
+ }
1635
+
1636
+ export interface SurveyQuestion {
1637
+ id: string;
1638
+ type?: 'single' | 'multiple' | 'score' | 'matrix' | 'text';
1639
+ label: string;
1640
+ options: string[];
1641
+ rows?: string[];
1642
+ scale?: number;
1643
+ }
1644
+
1645
+ export interface SurveyBlockData {
1646
+ questionnaireRef: string;
1647
+ progress: {
1648
+ current: number;
1649
+ total: number;
1650
+ };
1651
+ questions: SurveyQuestion[];
1652
+ answers: Record<string, unknown>;
1653
+ status: 'draft' | 'submitted';
1654
+ submittedAt?: string;
1655
+ }
1656
+
1657
+ export interface ActionGroupData {
1658
+ buttons: Array<{
1659
+ id: string;
1660
+ label: string;
1661
+ actionType: string;
1662
+ description: string;
1663
+ confirmLevel?: 'L1' | 'L2' | 'L3' | 'L4';
1664
+ affectedCount?: number;
1665
+ resultPreview?: string;
1666
+ }>;
1667
+ }
1668
+
1669
+ export interface WorkflowBlockData {
1670
+ instanceRef: string;
1671
+ status: string;
1672
+ lanes?: Array<{
1673
+ label: string;
1674
+ owner: string;
1675
+ status: string;
1676
+ }>;
1677
+ statusBoard?: Array<{
1678
+ label: string;
1679
+ count: number;
1680
+ status: string;
1681
+ }>;
1682
+ steps: Array<{
1683
+ time: string;
1684
+ label: string;
1685
+ status: string;
1686
+ owner?: string;
1687
+ description?: string;
1688
+ }>;
1689
+ }
1690
+
1691
+ export interface ReportSection {
1692
+ title: string;
1693
+ body: string;
1694
+ }
1695
+
1696
+ export interface ReportBlockData {
1697
+ reportRef: string;
1698
+ status: string;
1699
+ summary: string;
1700
+ sections: ReportSection[];
1701
+ exportFormats?: Array<'PDF' | 'PPT' | 'Word'>;
1702
+ version: number;
1703
+ updatedAt: string;
1704
+ }
1705
+
1706
+ export interface LayoutConfig {
1707
+ cols: number;
1708
+ rows: number;
1709
+ maxCols: number;
1710
+ maxRows: number;
1711
+ isSquareCell: boolean;
1712
+ layoutVersion: number;
1713
+ }
1714
+
1715
+ export interface WorkbenchVisualConfig {
1716
+ themeId?: string;
1717
+ accentColor?: string;
1718
+ backgroundColor?: string;
1719
+ textColor?: string;
1720
+ borderColor?: string;
1721
+ cardRadius?: number;
1722
+ cardShadow?: 'none' | 'soft' | 'standard' | 'strong';
1723
+ density?: 'thumbnail' | 'compact' | 'standard' | 'expanded';
1724
+ }
1725
+
1726
+ export interface WorkbenchCardStyleConfig extends WorkbenchVisualConfig {
1727
+ css?: Record<string, string | number | boolean | null>;
1728
+ shell?: Record<string, unknown>;
1729
+ }
1730
+
1731
+ export interface WorkbenchSnapshotVisualConfig {
1732
+ cardStyle?: WorkbenchCardStyleConfig;
1733
+ echartsDefaults?: Record<string, unknown>;
1734
+ layoutTree?: WorkbenchLayoutV4;
1735
+ }
1736
+
1737
+ export interface ChartVisualOptions {
1738
+ palette?: string[];
1739
+ showLegend?: boolean;
1740
+ showTooltip?: boolean;
1741
+ smooth?: boolean;
1742
+ stacked?: boolean;
1743
+ labelMode?: 'none' | 'inside' | 'outside';
1744
+ }
1745
+
1746
+ export interface BlockVisualOptions {
1747
+ themeId?: string;
1748
+ density?: 'thumbnail' | 'compact' | 'standard' | 'expanded';
1749
+ accentColor?: string;
1750
+ backgroundColor?: string;
1751
+ textColor?: string;
1752
+ borderColor?: string;
1753
+ cardRadius?: number;
1754
+ cardShadow?: 'none' | 'soft' | 'standard' | 'strong';
1755
+ cardTone?: 'neutral' | 'brand' | 'success' | 'warning' | 'danger';
1756
+ businessSummaryBand?: 'risk';
1757
+ metricVariant?: 'standard' | 'centerNumber';
1758
+ hideSecondary?: boolean;
1759
+ hideMetricLabel?: boolean;
1760
+ hideMetricFooter?: boolean;
1761
+ showSubtitleInThumbnail?: boolean;
1762
+ chart?: ChartVisualOptions;
1763
+ allowedVisualPatchPaths?: string[];
1764
+ advancedVisualPatch?: {
1765
+ enabled: boolean;
1766
+ disclaimerAcceptedAt?: string;
1767
+ rollbackVersion?: number;
1768
+ };
1769
+ }
1770
+
1771
+ export type CardCapacityLevel = 'micro' | 'compact' | 'standard' | 'expanded' | 'canvas';
1772
+ export type CardContentDensity = 'minimal' | 'compact' | 'standard' | 'rich' | 'dashboard';
1773
+
1774
+ export interface CardCapacityFacts {
1775
+ grid: {
1776
+ cols: number;
1777
+ rows: number;
1778
+ blockW: number;
1779
+ blockH: number;
1780
+ blockArea: number;
1781
+ };
1782
+ viewport: {
1783
+ width: number;
1784
+ height: number;
1785
+ columnsVisible: number;
1786
+ };
1787
+ pixelBox: {
1788
+ width: number;
1789
+ height: number;
1790
+ contentWidth: number;
1791
+ contentHeight: number;
1792
+ area: number;
1793
+ };
1794
+ rendererCapabilities: Array<{
1795
+ rendererKey: string;
1796
+ minWidth: number;
1797
+ minHeight: number;
1798
+ recommendedCapacity: CardCapacityLevel;
1799
+ supportsResponsiveTiers: boolean;
1800
+ }>;
1801
+ userSizeIntent: 'small' | 'medium' | 'large' | 'will_resize_later' | 'unspecified';
1802
+ }
1803
+
1804
+ export interface CardFitAnalysis {
1805
+ requestedTopic: string;
1806
+ capacityLevel: CardCapacityLevel;
1807
+ userSizeIntent: CardCapacityFacts['userSizeIntent'];
1808
+ informationGoal: 'single_metric' | 'trend' | 'composition' | 'comparison' | 'dashboard' | 'workflow' | 'unknown';
1809
+ contentDensity: CardContentDensity;
1810
+ recommendedRendererKey: string;
1811
+ selectedContent: string[];
1812
+ omittedContent: string[];
1813
+ overflowRisk: 'low' | 'medium' | 'high';
1814
+ shouldSuggestResize: boolean;
1815
+ suggestedResize?: { w: number; h: number; reason: string };
1816
+ reasoningSummary: string[];
1817
+ }
1818
+
1819
+ export interface ResponsiveContentTier {
1820
+ title?: string;
1821
+ subtitle?: string;
1822
+ renderer?: BlockRenderer;
1823
+ subType?: BlockSubType | string;
1824
+ data?: DisplayBlockData | Record<string, unknown>;
1825
+ visual?: BlockVisualOptions;
1826
+ summary: string;
1827
+ }
1828
+
1829
+ export interface ResponsiveContentTiers {
1830
+ compact?: ResponsiveContentTier;
1831
+ standard?: ResponsiveContentTier;
1832
+ expanded?: ResponsiveContentTier;
1833
+ canvas?: ResponsiveContentTier;
1834
+ }
1835
+
1836
+ export type RuntimeCapabilityLevel = 'config' | 'composition';
1837
+ export type RuntimeCapabilitySlot =
1838
+ | 'card.header.left'
1839
+ | 'card.header.right'
1840
+ | 'card.body.toolbar'
1841
+ | 'card.body.inline'
1842
+ | 'card.body.emptyState'
1843
+ | 'card.footer.actions'
1844
+ | 'card.detail.panel'
1845
+ | 'workspace.banner.topRight';
1846
+ export type RuntimeCapabilityUiKind = 'iconButton+popover' | 'inlinePanel' | 'filterBar' | 'drawerPanel';
1847
+ export type RuntimeCapabilityDataSource = 'cardSearchIndex' | 'routeTargetRegistry' | 'businessObjectQuery';
1848
+ export type RuntimeCapabilityActionType =
1849
+ | 'focusCard'
1850
+ | 'openRoute'
1851
+ | 'refreshData'
1852
+ | 'toggleFavorite'
1853
+ | 'exportData'
1854
+ | 'tableSelection'
1855
+ | 'openDrawer'
1856
+ | 'callApiAction';
1857
+ export type RuntimeCapabilityMutationAction =
1858
+ | 'mount'
1859
+ | 'unmount'
1860
+ | 'update'
1861
+ | 'move'
1862
+ | 'enable'
1863
+ | 'disable'
1864
+ | 'replace';
1865
+
1866
+ export interface RuntimeCapabilityMount {
1867
+ id: string;
1868
+ name: string;
1869
+ level: RuntimeCapabilityLevel;
1870
+ version: number;
1871
+ description?: string;
1872
+ slot: RuntimeCapabilitySlot;
1873
+ placement?: 'prepend' | 'append';
1874
+ ui: {
1875
+ kind: RuntimeCapabilityUiKind;
1876
+ icon?: string;
1877
+ tooltip?: string;
1878
+ placeholder?: string;
1879
+ submitLabel?: string;
1880
+ emptyText?: string;
1881
+ };
1882
+ state?: {
1883
+ query?: {
1884
+ type: 'string';
1885
+ defaultValue?: string;
1886
+ };
1887
+ filter?: Record<string, unknown>;
1888
+ sort?: { field?: string; direction?: 'asc' | 'desc' };
1889
+ pagination?: { pageSize?: number };
1890
+ };
1891
+ data: {
1892
+ source: RuntimeCapabilityDataSource;
1893
+ queryStateKey?: 'query';
1894
+ matchFields?: string[];
1895
+ limit?: number;
1896
+ target?: string;
1897
+ objectType?: string;
1898
+ fields?: string[];
1899
+ filters?: Record<string, unknown>;
1900
+ timeRange?: string;
1901
+ };
1902
+ actions: Array<{
1903
+ trigger: 'onSelectResult' | 'onSubmit' | 'onClick' | 'onChange';
1904
+ type: RuntimeCapabilityActionType;
1905
+ target?: string;
1906
+ params?: Record<string, unknown>;
1907
+ }>;
1908
+ permissions: {
1909
+ read: string[];
1910
+ write: string[];
1911
+ routeTargets?: string[];
1912
+ sideEffects?: string[];
1913
+ };
1914
+ disabled?: boolean;
1915
+ traceSummary?: string;
1916
+ }
1917
+
1918
+ export interface RuntimeCapabilityMutation {
1919
+ action: RuntimeCapabilityMutationAction;
1920
+ targetCardSelector?: IntentTargetSelector;
1921
+ match?: {
1922
+ capabilityId?: string;
1923
+ slot?: RuntimeCapabilitySlot;
1924
+ uiIcon?: string;
1925
+ dataSource?: RuntimeCapabilityDataSource;
1926
+ actionType?: RuntimeCapabilityActionType;
1927
+ nameKeywords?: string[];
1928
+ };
1929
+ capabilitySpec?: RuntimeCapabilityMount;
1930
+ missingPrimitives?: string[];
1931
+ patch?: {
1932
+ slot?: RuntimeCapabilitySlot;
1933
+ placement?: 'prepend' | 'append';
1934
+ ui?: Partial<RuntimeCapabilityMount['ui']>;
1935
+ data?: Partial<RuntimeCapabilityMount['data']>;
1936
+ actions?: RuntimeCapabilityMount['actions'];
1937
+ disabled?: boolean;
1938
+ };
1939
+ reasonSummary?: string[];
1940
+ }
1941
+
1942
+ export interface BlockMeta {
1943
+ visual?: BlockVisualOptions;
1944
+ cardCapacityFacts?: CardCapacityFacts;
1945
+ cardFitAnalysis?: CardFitAnalysis;
1946
+ responsiveContentTiers?: ResponsiveContentTiers;
1947
+ capabilityMounts?: RuntimeCapabilityMount[];
1948
+ [key: string]: unknown;
1949
+ }
1950
+
1951
+ export interface BlockPlan {
1952
+ id: string;
1953
+ version: number;
1954
+ blockType: BlockType;
1955
+ subType: BlockSubType | string;
1956
+ title: string;
1957
+ subtitle?: string;
1958
+ layout: BlockLayout;
1959
+ intent: BlockIntent;
1960
+ source?: BlockSource;
1961
+ renderer?: BlockRenderer;
1962
+ state: BlockState;
1963
+ actions?: Array<WorkbenchAction | Record<string, unknown>>;
1964
+ meta?: BlockMeta;
1965
+ }
1966
+
1967
+ export interface MaterializedBlock extends BlockPlan {
1968
+ data?: DisplayBlockData | Record<string, unknown>;
1969
+ form?: FormBlockData | Record<string, unknown>;
1970
+ survey?: SurveyBlockData | Record<string, unknown>;
1971
+ actionGroup?: ActionGroupData | Record<string, unknown>;
1972
+ workflow?: WorkflowBlockData | Record<string, unknown>;
1973
+ report?: ReportBlockData | Record<string, unknown>;
1974
+ }
1975
+
1976
+ export type WorkbenchBlock = MaterializedBlock;
1977
+
1978
+ export interface WorkbenchSnapshot {
1979
+ workspaceId: string;
1980
+ roleId: RoleId | '';
1981
+ userId: string;
1982
+ version: number;
1983
+ layoutVersion?: number;
1984
+ layoutConfig?: LayoutConfig;
1985
+ visualConfig?: WorkbenchSnapshotVisualConfig;
1986
+ updatedAt: string;
1987
+ blocks: MaterializedBlock[];
1988
+ }
1989
+
1990
+ export interface MutationStep {
1991
+ id: string;
1992
+ label: string;
1993
+ kind: MutationStepKind;
1994
+ targetBlockIds: string[];
1995
+ before: unknown;
1996
+ after: unknown;
1997
+ reversible: boolean;
1998
+ dependsOnStepIds?: string[];
1999
+ }
2000
+
2001
+ export interface MutationTransaction {
2002
+ id: string;
2003
+ source: MutationTransactionSource;
2004
+ userInstruction: string;
2005
+ aiReasoningSummary: string[];
2006
+ operation: CardMutationOperation;
2007
+ targetBlockIds: string[];
2008
+ beforeSnapshot: WorkbenchSnapshot;
2009
+ afterSnapshot: WorkbenchSnapshot;
2010
+ steps: MutationStep[];
2011
+ createdAt: string;
2012
+ }
2013
+
2014
+ export type ArtifactType =
2015
+ | 'card_plan_block'
2016
+ | 'layout_draft'
2017
+ | 'preview_draft'
2018
+ | 'preview_block'
2019
+ | 'canvas_block'
2020
+ | 'patch_plan'
2021
+ | 'submit_draft'
2022
+ | 'answer'
2023
+ | 'confirmation';
2024
+
2025
+ export type ArtifactStatus =
2026
+ | 'draft'
2027
+ | 'needs_confirmation'
2028
+ | 'confirmed'
2029
+ | 'preview_ready'
2030
+ | 'applied'
2031
+ | 'submitted'
2032
+ | 'superseded'
2033
+ | 'failed';
2034
+
2035
+ export interface ArtifactIndexItem {
2036
+ artifactId: string;
2037
+ type: ArtifactType;
2038
+ workItemId: string;
2039
+ turnId: string;
2040
+ status: ArtifactStatus;
2041
+ title: string;
2042
+ aliases: string[];
2043
+ ordinal?: number;
2044
+ createdAt: string;
2045
+ updatedAt: string;
2046
+ payloadRef: {
2047
+ source: 'turn' | 'snapshot' | 'store';
2048
+ path: string;
2049
+ };
2050
+ lightweightPayload: Record<string, unknown>;
2051
+ }
2052
+
2053
+ export interface CanvasBlockContext extends MaterializedBlock {
2054
+ rendererKey?: string;
2055
+ nestedTitles?: string[];
2056
+ }
2057
+
2058
+ export interface CanonicalLayoutContext {
2059
+ baseVersion: number;
2060
+ layoutVersion: number;
2061
+ layoutSource: 'gridstack_layout_tree' | 'block_layout';
2062
+ layoutFingerprint: string;
2063
+ layoutTree?: Record<string, unknown>;
2064
+ blockLayouts?: Array<{ blockId: string; layout: Pick<BlockLayout, 'x' | 'y' | 'w' | 'h'> }>;
2065
+ updatedAt?: string;
2066
+ }
2067
+
2068
+ export interface CanvasContext {
2069
+ snapshotVersion: number;
2070
+ layoutConfig: LayoutConfig;
2071
+ blockCount: number;
2072
+ blocks: CanvasBlockContext[];
2073
+ selectedBlock?: {
2074
+ id: string;
2075
+ title: string;
2076
+ blockType: string;
2077
+ subType: string;
2078
+ rendererKey?: string;
2079
+ } | null;
2080
+ canonicalLayoutContext?: CanonicalLayoutContext;
2081
+ }
2082
+
2083
+ export interface TurnContextSummary {
2084
+ turnId: string;
2085
+ workItemId: string;
2086
+ order: number;
2087
+ userPrompt: string;
2088
+ assistantSummary: string;
2089
+ intentChannel: WorkbenchIntentChannel;
2090
+ status:
2091
+ | 'streaming'
2092
+ | 'ready'
2093
+ | 'needs_confirmation'
2094
+ | 'applied'
2095
+ | 'submitted'
2096
+ | 'failed'
2097
+ | 'cancelled';
2098
+ createdAt: string;
2099
+ updatedAt: string;
2100
+ artifactIds: string[];
2101
+ }
2102
+
2103
+ export interface RecentFocus {
2104
+ latestTurnId?: string;
2105
+ latestNonAnswerTurnId?: string;
2106
+ latestCardWorkItemId?: string;
2107
+ latestPatchWorkItemId?: string;
2108
+ latestSubmitWorkItemId?: string;
2109
+ latestPreviewDraftId?: string;
2110
+ latestSubmitDraftId?: string;
2111
+ selectedBlockId?: string | null;
2112
+ selectedNestedBlock?: {
2113
+ parentId: string;
2114
+ childId: string;
2115
+ } | null;
2116
+ lastInsertedBlockIds?: string[];
2117
+ lastHighlightedBlockIds?: string[];
2118
+ pendingPatch?: {
2119
+ id: string;
2120
+ sourceTurnId: string;
2121
+ status: PendingWorkbenchPatch['status'];
2122
+ candidateBlockIds: string[];
2123
+ targetSummary?: string;
2124
+ userInstruction: string;
2125
+ } | null;
2126
+ }
2127
+
2128
+ export interface ConversationScreenContext {
2129
+ conversationId: string;
2130
+ activeTurnId?: string;
2131
+ activeWorkItemId?: string;
2132
+ roleId: RoleId | '';
2133
+ workspaceId: string;
2134
+ userId: string;
2135
+ currentInput: string;
2136
+ selectedBlock?: CanvasContext['selectedBlock'];
2137
+ canvas: CanvasContext;
2138
+ visibleTurns: TurnContextSummary[];
2139
+ artifactIndex: ArtifactIndexItem[];
2140
+ recentFocus: RecentFocus;
2141
+ }
2142
+
2143
+ export interface WorkbenchTemplate {
2144
+ id: string;
2145
+ resource_id: string;
2146
+ path: string;
2147
+ name: string;
2148
+ tag: string;
2149
+ description: string;
2150
+ source: 'fde_preset' | 'user_saved';
2151
+ renameable: boolean;
2152
+ ownerUserId?: string;
2153
+ roleId?: RoleId;
2154
+ createdAt: string;
2155
+ updatedAt: string;
2156
+ }
2157
+
2158
+ export interface UserWorkbenchPreference {
2159
+ activeWorkbenchId: string;
2160
+ defaultWorkbenchId: string;
2161
+ assistantPersona?: AssistantPersonaKey;
2162
+ }
2163
+
2164
+ export interface WorkbenchConversationWorkItem {
2165
+ id: string;
2166
+ title: string;
2167
+ intentChannel: WorkbenchIntentChannel;
2168
+ status: 'active' | 'paused' | 'completed' | 'failed';
2169
+ relatedTurnIds: string[];
2170
+ contextSummary?: string;
2171
+ createdAt: string;
2172
+ updatedAt: string;
2173
+ }
2174
+
2175
+ export interface SkillMetadata {
2176
+ id: string;
2177
+ name: string;
2178
+ intentTypes: WorkbenchIntentChannel[];
2179
+ inputSchema: unknown;
2180
+ outputSchema: unknown;
2181
+ requiredContext: string[];
2182
+ requiredTools: string[];
2183
+ permissionScope: string[];
2184
+ confirmationPolicy: 'none' | 'low_risk' | 'required';
2185
+ canWrite: boolean;
2186
+ fallbackPolicy: 'none' | 'general_skill' | 'error';
2187
+ }
2188
+
2189
+ export interface PlannerStep {
2190
+ label: string;
2191
+ status: 'done' | 'ready' | 'pending';
2192
+ detail: string;
2193
+ }
2194
+
2195
+ export interface CardPlan {
2196
+ target: 'canvas_preview';
2197
+ blocks: BlockPlan[];
2198
+ mutationPlan: WorkbenchMutationPlan;
2199
+ }
2200
+
2201
+ export interface CardTargetResolveResult {
2202
+ status: 'resolved' | 'candidates' | 'not_found' | 'needs_clarification';
2203
+ mode: 'selected' | 'recent_inserted' | 'ordinal' | 'row_column' | 'region' | 'title' | 'scope' | 'chart_type' | 'ai_semantic';
2204
+ targetBlockIds: string[];
2205
+ candidateBlockIds: string[];
2206
+ confidence: number;
2207
+ reason: string;
2208
+ warnings: string[];
2209
+ requiresConfirmation?: boolean;
2210
+ targetSummary?: string;
2211
+ }
2212
+
2213
+ export type WorkbenchPatchIntentOperation =
2214
+ | 'renameTitle'
2215
+ | 'editText'
2216
+ | 'modifyStyle'
2217
+ | 'changeChart'
2218
+ | 'changeDataSource'
2219
+ | 'replaceCard'
2220
+ | 'adjustLayout'
2221
+ | 'deleteCard'
2222
+ | 'batchModify';
2223
+
2224
+ export interface WorkbenchPatchIntent {
2225
+ id: string;
2226
+ sourceTurnId: string;
2227
+ userInstruction: string;
2228
+ operation: WorkbenchPatchIntentOperation;
2229
+ editModes: CardPatchEditMode[];
2230
+ targetQuery: string;
2231
+ payload: Record<string, unknown>;
2232
+ riskLevel: 'low' | 'medium' | 'high';
2233
+ requiresConfirmation: boolean;
2234
+ }
2235
+
2236
+ export interface PendingWorkbenchPatchCandidateSummary {
2237
+ id: string;
2238
+ title: string;
2239
+ positionLabel: string;
2240
+ rendererKey?: string;
2241
+ }
2242
+
2243
+ export interface PendingWorkbenchPatch {
2244
+ id: string;
2245
+ sourceTurnId: string;
2246
+ patchIntent: WorkbenchPatchIntent;
2247
+ targetResolve: CardTargetResolveResult;
2248
+ candidateBlockIds: string[];
2249
+ candidateSummaries: PendingWorkbenchPatchCandidateSummary[];
2250
+ baseSnapshotVersion: number;
2251
+ status: 'awaiting_target' | 'awaiting_confirmation';
2252
+ createdAt: string;
2253
+ expiresAt: string;
2254
+ }
2255
+
2256
+ export type CardPatchErrorCode =
2257
+ | 'CARD_TARGET_NOT_FOUND'
2258
+ | 'CARD_TARGET_AMBIGUOUS'
2259
+ | 'CARD_PATCH_UNSUPPORTED'
2260
+ | 'CHART_TYPE_INCOMPATIBLE'
2261
+ | 'WORKBENCH_VERSION_CONFLICT';
2262
+
2263
+ export type CardPatchSuggestionType =
2264
+ | 'select_card'
2265
+ | 'choose_candidate'
2266
+ | 'retry_prompt'
2267
+ | 'regenerate_chart'
2268
+ | 'change_chart_type'
2269
+ | 'refresh_workspace';
2270
+
2271
+ export interface CardPatchTargetSummary {
2272
+ blockId: string;
2273
+ title: string;
2274
+ blockType?: string;
2275
+ subType?: string;
2276
+ rendererKey?: string;
2277
+ layout?: Pick<BlockLayout, 'x' | 'y' | 'w' | 'h'>;
2278
+ confidence?: number;
2279
+ reason?: string;
2280
+ }
2281
+
2282
+ export interface CardPatchSuggestion {
2283
+ type: CardPatchSuggestionType;
2284
+ label: string;
2285
+ prompt?: string;
2286
+ targetBlockId?: string;
2287
+ }
2288
+
2289
+ export interface CardPatchErrorPayload {
2290
+ code: CardPatchErrorCode;
2291
+ message: string;
2292
+ summary: string;
2293
+ detail?: string;
2294
+ targetText?: string;
2295
+ target?: CardPatchTargetSummary;
2296
+ candidates?: CardPatchTargetSummary[];
2297
+ suggestions?: CardPatchSuggestion[];
2298
+ }
2299
+
2300
+ export interface PatchPlan {
2301
+ operation?: CardPatchOperation;
2302
+ editModes?: CardPatchEditMode[];
2303
+ scope?: 'single' | 'group' | 'all' | 'global_common';
2304
+ targetBlockIds: string[];
2305
+ targetSummary?: string;
2306
+ target?: CardPatchTargetSummary | null;
2307
+ reason?: string;
2308
+ targetResolve?: CardTargetResolveResult;
2309
+ filteredOptionKeys?: string[];
2310
+ patches: Array<{
2311
+ blockId?: string;
2312
+ path: string;
2313
+ value: unknown;
2314
+ mergeMode?: 'replace' | 'deepMerge' | 'arrayMergeById' | 'arrayMergeByType';
2315
+ reason?: string;
2316
+ }>;
2317
+ allowedPatchPaths?: string[];
2318
+ regenerationPrompt?: string;
2319
+ canvasAction?: CanvasApplyAction;
2320
+ requiresConfirmation?: boolean;
2321
+ riskLevel?: 'low' | 'medium' | 'high';
2322
+ summary?: string;
2323
+ warnings?: string[];
2324
+ error?: CardPatchErrorPayload;
2325
+ suggestions?: CardPatchSuggestion[];
2326
+ note?: string;
2327
+ confirmation?: Record<string, unknown>;
2328
+ }
2329
+
2330
+ export interface AnswerPlan {
2331
+ answerType:
2332
+ | 'weather'
2333
+ | 'calendar'
2334
+ | 'knowledge_base'
2335
+ | 'policy'
2336
+ | 'workspace_context'
2337
+ | 'business_data_analysis'
2338
+ | 'chart_compare_analysis'
2339
+ | 'external_news'
2340
+ | 'general';
2341
+ dataSources: string[];
2342
+ canWrite: false;
2343
+ }
2344
+
2345
+ export interface SubmitPlan {
2346
+ draftId: string;
2347
+ submitType: SubmitType;
2348
+ targetBlockId?: string;
2349
+ targetBlockTitle?: string;
2350
+ executor?: SubmitDraftExecutor;
2351
+ payload?: Record<string, unknown>;
2352
+ missingFields: string[];
2353
+ confirmation: ConversationConfirmation;
2354
+ status?: SubmitDraftStatus;
2355
+ }
2356
+
2357
+ export type SubmitType = 'form' | 'survey' | 'action' | 'workflow' | 'data_write' | 'report';
2358
+
2359
+ export type SubmitDraftExecutor =
2360
+ | 'form_submit'
2361
+ | 'survey_submit'
2362
+ | 'action_execute'
2363
+ | 'report_generate'
2364
+ | 'workflow_transition'
2365
+ | 'data_write';
2366
+
2367
+ export type SubmitDraftStatus =
2368
+ | 'draft'
2369
+ | 'needs_confirmation'
2370
+ | 'confirmed'
2371
+ | 'executing'
2372
+ | 'submitted'
2373
+ | 'failed'
2374
+ | 'cancelled';
2375
+
2376
+ export interface SubmitDraft extends SubmitPlan {
2377
+ executor: SubmitDraftExecutor;
2378
+ payload: Record<string, unknown>;
2379
+ status: SubmitDraftStatus;
2380
+ workspaceId: string;
2381
+ roleId: RoleId;
2382
+ userId: string;
2383
+ conversationId?: string;
2384
+ sourceTurnId?: string;
2385
+ createdAt: string;
2386
+ updatedAt: string;
2387
+ lastError?: string;
2388
+ }
2389
+
2390
+ export type ProductStreamPhase =
2391
+ | 'received'
2392
+ | 'routing'
2393
+ | 'context'
2394
+ | 'planning'
2395
+ | 'tool_running'
2396
+ | 'drafting'
2397
+ | 'previewing'
2398
+ | 'confirming'
2399
+ | 'finalizing'
2400
+ | 'done';
2401
+
2402
+ export interface ReferenceResolutionTrace {
2403
+ isContinuation: boolean;
2404
+ confidence: number;
2405
+ targetWorkItemId?: string;
2406
+ targetTurnId?: string;
2407
+ targetArtifactIds: string[];
2408
+ targetKind?: ArtifactType;
2409
+ reason: string;
2410
+ rewrittenInput: string;
2411
+ warnings: string[];
2412
+ }
2413
+
2414
+ export interface TracePlan {
2415
+ items: ConversationTurnTraceItem[];
2416
+ requestContext?: {
2417
+ title?: string;
2418
+ lines?: string[];
2419
+ };
2420
+ referenceResolution?: ReferenceResolutionTrace;
2421
+ continuation?: {
2422
+ workItemId?: string;
2423
+ targetArtifactId?: string;
2424
+ mode?: 'new_generation' | 'revise_previous_draft' | 'confirm_previous_preview';
2425
+ };
2426
+ }
2427
+
2428
+ export interface PlanResponse {
2429
+ status: 'plan_ready';
2430
+ intentChannel: WorkbenchIntentChannel;
2431
+ reply: string;
2432
+ summary: string;
2433
+ assumptions: string[];
2434
+ plannerSteps: PlannerStep[];
2435
+ cardPlan?: CardPlan;
2436
+ patchPlan?: PatchPlan | null;
2437
+ answerPlan?: AnswerPlan | null;
2438
+ submitPlan?: SubmitPlan | null;
2439
+ tracePlan?: TracePlan | null;
2440
+ /**
2441
+ * Compatibility accessor for existing materialization code.
2442
+ * New code should read `cardPlan.blocks`.
2443
+ */
2444
+ blockPlans: BlockPlan[];
2445
+ /**
2446
+ * Compatibility accessor for existing canvas mutation code.
2447
+ * New code should read `cardPlan.mutationPlan`.
2448
+ */
2449
+ mutationPlan: WorkbenchMutationPlan;
2450
+ }
2451
+
2452
+ export interface MaterializeResponse {
2453
+ summary: string;
2454
+ materializedBlocks: MaterializedBlock[];
2455
+ }
2456
+
2457
+ export interface ActionLogItem {
2458
+ id: string;
2459
+ blockId: string;
2460
+ actionId: string;
2461
+ actionLabel: string;
2462
+ roleId: RoleId;
2463
+ userId: string;
2464
+ workspaceId: string;
2465
+ executedAt: string;
2466
+ result: string;
2467
+ }
2468
+
2469
+ export interface WorkbenchRoleMeta {
2470
+ id: RoleId;
2471
+ label: string;
2472
+ shortLabel: string;
2473
+ description: string;
2474
+ orgName: string;
2475
+ scene: string;
2476
+ template: string;
2477
+ theme: string;
2478
+ heroTitle: string;
2479
+ heroDescription: string;
2480
+ accents: {
2481
+ chip: string;
2482
+ glow: string;
2483
+ border: string;
2484
+ };
2485
+ quickPrompts: string[];
2486
+ keyFocus: string[];
2487
+ }