@fses/workbench-app 0.2.0 → 0.2.2

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