vue-agent-start 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/package.json +30 -0
  2. package/pnpm-workspace.yaml +3 -0
  3. package/src/agent-flow/adapter/backend.ts +99 -0
  4. package/src/agent-flow/components/ChatIframePanel.vue +773 -0
  5. package/src/agent-flow/components/DatasetItemCard.vue +313 -0
  6. package/src/agent-flow/components/MemoryWindow.vue +104 -0
  7. package/src/agent-flow/components/PromptEditor.vue +804 -0
  8. package/src/agent-flow/components/PromptEditorTagPanel.vue +460 -0
  9. package/src/agent-flow/components/SvgIcon.vue +32 -0
  10. package/src/agent-flow/components/ToolItemCard.vue +169 -0
  11. package/src/agent-flow/components/VariableCard.vue +161 -0
  12. package/src/agent-flow/components/VariableSelector.vue +162 -0
  13. package/src/agent-flow/components/chat-iframe-types.ts +35 -0
  14. package/src/agent-flow/components/stubs/DatasetChooser.vue +70 -0
  15. package/src/agent-flow/components/stubs/Embedding.vue +22 -0
  16. package/src/agent-flow/components/stubs/ModelSelect.vue +24 -0
  17. package/src/agent-flow/components/stubs/RestfulSelectCard.vue +24 -0
  18. package/src/agent-flow/components/stubs/ToolChooser.vue +96 -0
  19. package/src/agent-flow/components/stubs/TriggersItemCard.vue +126 -0
  20. package/src/agent-flow/components/stubs/VariableModal.vue +115 -0
  21. package/src/agent-flow/index.ts +73 -0
  22. package/src/agent-flow/stores/workflow.ts +72 -0
  23. package/src/agent-flow/utils/langUtils.ts +173 -0
  24. package/src/agent-flow/workflow/Ability.vue +65 -0
  25. package/src/agent-flow/workflow/AuthorizationItem.vue +101 -0
  26. package/src/agent-flow/workflow/ConversationVar.vue +42 -0
  27. package/src/agent-flow/workflow/CustomEdge.vue +94 -0
  28. package/src/agent-flow/workflow/EnvironmentVar.vue +40 -0
  29. package/src/agent-flow/workflow/FlowDesigner.vue +2802 -0
  30. package/src/agent-flow/workflow/Icon.vue +179 -0
  31. package/src/agent-flow/workflow/NodeConfig.vue +509 -0
  32. package/src/agent-flow/workflow/NodeConfigCard.vue +460 -0
  33. package/src/agent-flow/workflow/NodeHandle.vue +147 -0
  34. package/src/agent-flow/workflow/NodeHeaderToolbar.vue +77 -0
  35. package/src/agent-flow/workflow/NodeHoverToolbar.vue +176 -0
  36. package/src/agent-flow/workflow/OutputItemCard.vue +668 -0
  37. package/src/agent-flow/workflow/ParamTableItem.vue +200 -0
  38. package/src/agent-flow/workflow/StructTable.vue +202 -0
  39. package/src/agent-flow/workflow/VarInsertField.vue +517 -0
  40. package/src/agent-flow/workflow/VarSelectField.vue +223 -0
  41. package/src/agent-flow/workflow/VariableSelectorItem.vue +48 -0
  42. package/src/agent-flow/workflow/WfField.vue +206 -0
  43. package/src/agent-flow/workflow/_config-base.css +470 -0
  44. package/src/agent-flow/workflow/composables/useNode.js +55 -0
  45. package/src/agent-flow/workflow/index.vue +53 -0
  46. package/src/agent-flow/workflow/nodeCard/AgentNodeCard.vue +180 -0
  47. package/src/agent-flow/workflow/nodeCard/AnswerNodeCard.vue +65 -0
  48. package/src/agent-flow/workflow/nodeCard/ClassifierCard.vue +152 -0
  49. package/src/agent-flow/workflow/nodeCard/CodeNodeCard.vue +139 -0
  50. package/src/agent-flow/workflow/nodeCard/ConditionNodeCard.vue +323 -0
  51. package/src/agent-flow/workflow/nodeCard/DocumentExtractorCard.vue +83 -0
  52. package/src/agent-flow/workflow/nodeCard/EndNodeCard.vue +123 -0
  53. package/src/agent-flow/workflow/nodeCard/HttpNodeCard.vue +451 -0
  54. package/src/agent-flow/workflow/nodeCard/HumanInputCard.vue +152 -0
  55. package/src/agent-flow/workflow/nodeCard/IterationCard.vue +66 -0
  56. package/src/agent-flow/workflow/nodeCard/KnowledgeRetrievalCard.vue +48 -0
  57. package/src/agent-flow/workflow/nodeCard/LLMNodeCard.vue +206 -0
  58. package/src/agent-flow/workflow/nodeCard/ListOperatorCard.vue +188 -0
  59. package/src/agent-flow/workflow/nodeCard/ParameterExtractorCard.vue +352 -0
  60. package/src/agent-flow/workflow/nodeCard/ServiceApiNodeCard.vue +188 -0
  61. package/src/agent-flow/workflow/nodeCard/StartNodeCard.vue +216 -0
  62. package/src/agent-flow/workflow/nodeCard/VariableAssignerCard.vue +125 -0
  63. package/src/agent-flow/workflow/nodeCard/VariableNodeCard.vue +121 -0
  64. package/src/agent-flow/workflow/nodes/AgentNode.vue +122 -0
  65. package/src/agent-flow/workflow/nodes/AnswerNode.vue +99 -0
  66. package/src/agent-flow/workflow/nodes/ClassifierNode.vue +199 -0
  67. package/src/agent-flow/workflow/nodes/CodeNode.vue +152 -0
  68. package/src/agent-flow/workflow/nodes/ConditionNode.vue +232 -0
  69. package/src/agent-flow/workflow/nodes/DocumentExtractorNode.vue +96 -0
  70. package/src/agent-flow/workflow/nodes/EndNode.vue +119 -0
  71. package/src/agent-flow/workflow/nodes/FileUploadNode.vue +97 -0
  72. package/src/agent-flow/workflow/nodes/HttpNode.vue +204 -0
  73. package/src/agent-flow/workflow/nodes/HumanInputNode.vue +110 -0
  74. package/src/agent-flow/workflow/nodes/IterationNode.vue +98 -0
  75. package/src/agent-flow/workflow/nodes/KnowledgeRetrievalNode.vue +253 -0
  76. package/src/agent-flow/workflow/nodes/LLMNode.vue +134 -0
  77. package/src/agent-flow/workflow/nodes/ListOperatorNode.vue +111 -0
  78. package/src/agent-flow/workflow/nodes/LoopNode.vue +94 -0
  79. package/src/agent-flow/workflow/nodes/ParameterExtractorNode.vue +147 -0
  80. package/src/agent-flow/workflow/nodes/ServiceApiNode.vue +161 -0
  81. package/src/agent-flow/workflow/nodes/StartNode.vue +199 -0
  82. package/src/agent-flow/workflow/nodes/TemplateNode.vue +103 -0
  83. package/src/agent-flow/workflow/nodes/UserInputNode.vue +92 -0
  84. package/src/agent-flow/workflow/nodes/VariableAssignerNode.vue +145 -0
  85. package/src/agent-flow/workflow/nodes/VariableNode.vue +130 -0
  86. package/src/agent-flow/workflow/nodes/_node-base.css +338 -0
  87. package/src/agent-flow/workflow/utils/node_card_form.ts +335 -0
  88. package/src/agent-flow/workflow/utils/node_config.ts +63 -0
  89. package/src/agent-flow/workflow/utils/workflow_utils.ts +151 -0
  90. package/src/agent-studio/adapters/springAgentStart.ts +390 -0
  91. package/src/agent-studio/api/index.ts +1 -0
  92. package/src/agent-studio/api/types.ts +173 -0
  93. package/src/agent-studio/components/AgentApiDocs.vue +500 -0
  94. package/src/agent-studio/components/AgentAppsPage.vue +1601 -0
  95. package/src/agent-studio/components/AgentCardGrid.vue +259 -0
  96. package/src/agent-studio/components/AgentChatPage.vue +553 -0
  97. package/src/agent-studio/components/AgentDebugPanel.vue +350 -0
  98. package/src/agent-studio/components/AgentLogsPanel.vue +391 -0
  99. package/src/agent-studio/components/AgentMonitorPanel.vue +204 -0
  100. package/src/agent-studio/components/AgentOrchestrate.vue +505 -0
  101. package/src/agent-studio/components/AgentPromptEditor.vue +237 -0
  102. package/src/agent-studio/components/AgentStudioShell.vue +227 -0
  103. package/src/agent-studio/components/AgentToolsPanel.vue +394 -0
  104. package/src/agent-studio/components/AgentVariablesPanel.vue +205 -0
  105. package/src/agent-studio/components/ApiKeyManager.vue +251 -0
  106. package/src/agent-studio/components/AppDesignDrawer.vue +3391 -0
  107. package/src/agent-studio/components/CreateAppModal.vue +737 -0
  108. package/src/agent-studio/components/SparkChart.vue +200 -0
  109. package/src/agent-studio/components/VariableEditorModal.vue +499 -0
  110. package/src/agent-studio/composables/useAgentStudio.ts +347 -0
  111. package/src/agent-studio/index.ts +60 -0
  112. package/src/agent-studio/panels/DrawerFlowDesigner.vue +203 -0
  113. package/src/agent-studio/panels/LogAnnotationPanel.vue +490 -0
  114. package/src/agent-studio/panels/MonitorPanel.vue +535 -0
  115. package/src/agent-studio/types.ts +242 -0
  116. package/src/index.ts +155 -0
  117. package/src/knowledge-hub/adapters/springAgentStart.ts +472 -0
  118. package/src/knowledge-hub/components/AddDocumentsWizard.vue +1452 -0
  119. package/src/knowledge-hub/components/CreateDatasetWizard.vue +1723 -0
  120. package/src/knowledge-hub/components/DatasetCardGrid.vue +467 -0
  121. package/src/knowledge-hub/components/DatasetDetailDrawer.vue +888 -0
  122. package/src/knowledge-hub/components/DatasetPicker.vue +65 -0
  123. package/src/knowledge-hub/components/DatasetPickerModal.vue +526 -0
  124. package/src/knowledge-hub/components/DatasetSettingsPanel.vue +908 -0
  125. package/src/knowledge-hub/components/DatasetSidebar.vue +781 -0
  126. package/src/knowledge-hub/components/DocumentChunksView.vue +802 -0
  127. package/src/knowledge-hub/components/DocumentTable.vue +552 -0
  128. package/src/knowledge-hub/components/HitTestingPanel.vue +74 -0
  129. package/src/knowledge-hub/components/KnowledgeApp.vue +66 -0
  130. package/src/knowledge-hub/components/KnowledgeHubApp.vue +504 -0
  131. package/src/knowledge-hub/components/RecallTestingPanelV2.vue +515 -0
  132. package/src/knowledge-hub/components/RetrievalConfigPopover.vue +270 -0
  133. package/src/knowledge-hub/components/RetrievalMethodPicker.vue +547 -0
  134. package/src/knowledge-hub/components/RetrievedList.vue +24 -0
  135. package/src/knowledge-hub/components/internal/KhDialog.vue +195 -0
  136. package/src/knowledge-hub/composables/useKnowledge.ts +89 -0
  137. package/src/knowledge-hub/i18n/index.ts +2 -0
  138. package/src/knowledge-hub/i18n/messages.ts +422 -0
  139. package/src/knowledge-hub/i18n/useKhI18n.ts +107 -0
  140. package/src/knowledge-hub/index.ts +46 -0
  141. package/src/knowledge-hub/styles/index.css +4 -0
  142. package/src/knowledge-hub/styles/tokens.css +138 -0
  143. package/src/knowledge-hub/types/api.ts +213 -0
  144. package/src/knowledge-hub/types/dataset.ts +88 -0
  145. package/src/knowledge-hub/types/document.ts +45 -0
  146. package/src/knowledge-hub/types/index.ts +9 -0
  147. package/src/knowledge-hub/types/retrieval.ts +46 -0
  148. package/src/provider-hub/components/CredentialForm.vue +103 -0
  149. package/src/provider-hub/components/DefaultModelsPanel.vue +270 -0
  150. package/src/provider-hub/components/GroupedModelSelect.vue +445 -0
  151. package/src/provider-hub/components/ModelCardGrid.vue +332 -0
  152. package/src/provider-hub/components/ModelParameterDrawer.vue +739 -0
  153. package/src/provider-hub/components/ModelPickerPopover.vue +1282 -0
  154. package/src/provider-hub/components/ProviderApp.vue +159 -0
  155. package/src/provider-hub/components/ProviderCredentialModal.vue +321 -0
  156. package/src/provider-hub/components/ProviderGallery.vue +131 -0
  157. package/src/provider-hub/components/ProviderHubShell.vue +1992 -0
  158. package/src/provider-hub/components/ProviderIcon.vue +130 -0
  159. package/src/provider-hub/composables/useProviderHub.ts +358 -0
  160. package/src/provider-hub/index.ts +43 -0
  161. package/src/provider-hub/svg/MiniMax.svg +1 -0
  162. package/src/provider-hub/svg/Volcengine.svg +1 -0
  163. package/src/provider-hub/svg/Zhipu.svg +1 -0
  164. package/src/provider-hub/svg/deepseek.svg +1 -0
  165. package/src/provider-hub/svg/moonshot.svg +1 -0
  166. package/src/provider-hub/svg/openai.svg +1 -0
  167. package/src/provider-hub/svg/qwen.svg +1 -0
  168. package/src/provider-hub/svg/siliconflow.svg +1 -0
  169. package/src/provider-hub/types.ts +256 -0
@@ -0,0 +1,242 @@
1
+ /**
2
+ * Mirrors the backend REST payloads (see spring-agent-web AgentController).
3
+ */
4
+
5
+ export type AgentStrategy = 'FUNCTION_CALLING' | 'PLAN_EXECUTE' | 'REACT';
6
+
7
+ /**
8
+ * The "app kind" the user picks from the CreateAppModal. Dify calls these
9
+ * "application types" — each is really the same underlying agent runtime
10
+ * plus a canned config.
11
+ *
12
+ * <ul>
13
+ * <li>{@code chatflow} — 支持记忆的多轮对话工作流 (Dify parity). Uses the
14
+ * visual designer like {@code workflow}, but every run is scoped to a
15
+ * conversation so memory + streaming work.</li>
16
+ * <li>{@code workflow} — 面向单任务的可视化编排工作流. One-shot DAG run,
17
+ * no built-in memory.</li>
18
+ * </ul>
19
+ */
20
+ export type AppType =
21
+ | 'agent'
22
+ | 'chatbot'
23
+ | 'chatflow'
24
+ | 'text-generator'
25
+ | 'workflow';
26
+
27
+ export interface AgentEntity {
28
+ id: string;
29
+ tenantId: string;
30
+ name: string;
31
+ /** Card summary text (Dify parity). */
32
+ description?: string;
33
+ /** Emoji or icon key. */
34
+ icon?: string;
35
+ /** Hex background tint for the icon square, e.g. "#EEF4FF". */
36
+ iconBackground?: string;
37
+ /**
38
+ * Dify-parity app mode — determines which design surface the drawer opens:
39
+ * agent | chat | completion → orchestrate + preview
40
+ * workflow | chatflow → visual DAG designer
41
+ */
42
+ mode?: 'agent' | 'chat' | 'chatflow' | 'completion' | 'workflow';
43
+ instructions?: string;
44
+ openingStatement?: string;
45
+ suggestedQuestionsJson?: string;
46
+ datasetIdsJson?: string;
47
+ /**
48
+ * JSON blob controlling *how* retrieval runs against the attached datasets —
49
+ * top-k, method (VECTOR/FULL_TEXT/HYBRID), rerank, etc. Independent of
50
+ * {@link datasetIdsJson} which is just the list of dataset ids.
51
+ */
52
+ retrievalConfigJson?: string;
53
+ /**
54
+ * FK to `workflows.id` — the draft workflow's id, which equals the app id
55
+ * by invariant. Never carries the graph itself; fetch it via the draft API.
56
+ */
57
+ workflowId?: string;
58
+ /** Plain vendor model name (e.g. {@code qwen3.6-plus}). */
59
+ modelName?: string;
60
+ /** Provider key that owns {@link modelName} (e.g. {@code qwen}). */
61
+ modelProvider?: string;
62
+ /**
63
+ * Serialised runtime overrides — the 模型设置 drawer payload
64
+ * ({@code temperature}, {@code topP}, {@code maxTokens},
65
+ * {@code thinkingMode}, …). Mirror of {@code app_model_configs.configs}
66
+ * populated by the backend on read paths so the drawer's picker can
67
+ * hydrate its parameter panel without a second request.
68
+ */
69
+ modelSettingsJson?: string;
70
+ strategy: AgentStrategy;
71
+ toolNamesJson?: string;
72
+ approvalToolsJson?: string;
73
+ delegateAgentIdsJson?: string;
74
+ maxIterations?: number;
75
+ memoryEnabled?: boolean;
76
+ memoryWindow?: number;
77
+ published?: boolean;
78
+ createdAt?: string;
79
+ updatedAt?: string;
80
+ }
81
+
82
+ export interface CreateAgentRequest {
83
+ tenantId?: string;
84
+ name: string;
85
+ instructions?: string;
86
+ /** Plain vendor model name (e.g. {@code qwen3.6-plus}). */
87
+ modelName?: string;
88
+ /** Provider key that owns {@link modelName} (e.g. {@code qwen}). */
89
+ modelProvider?: string;
90
+ strategy?: AgentStrategy;
91
+ toolNames?: string[];
92
+ approvalRequiredTools?: string[];
93
+ delegateAgentIds?: string[];
94
+ maxIterations?: number;
95
+ memoryEnabled?: boolean;
96
+ memoryWindow?: number;
97
+ }
98
+
99
+ /** Describes one of the picker cards in {@link CreateAppModal}. */
100
+ export interface AppTypeDescriptor {
101
+ id: AppType;
102
+ title: string;
103
+ description: string;
104
+ /** Emoji / short glyph used as the card's icon. */
105
+ icon: string;
106
+ /** Solid background color for the icon square. */
107
+ iconBg: string;
108
+ /**
109
+ * A brief hint about the resulting agent's default config — e.g. which
110
+ * strategy / tools it starts with.
111
+ */
112
+ hint: string;
113
+ /** SVG preview markup (rendered as v-html). */
114
+ previewSvg: string;
115
+ }
116
+
117
+ // ---------------------------------------------------------------------------
118
+ // Editor-page (Dify "编排/API/日志/监测") view types.
119
+ //
120
+ // Kept intentionally close to Dify's data shape so the panels can render the
121
+ // same set of controls; the host is responsible for mapping these to whatever
122
+ // its backend actually stores.
123
+ // ---------------------------------------------------------------------------
124
+
125
+ export type StudioTab = 'orchestrate' | 'api' | 'logs' | 'monitor';
126
+
127
+ /** One item in the left-side vertical nav of the studio shell. */
128
+ export interface StudioNavItem {
129
+ id: StudioTab;
130
+ title: string;
131
+ /** Emoji / glyph fallback when {@link iconComponent} is not provided. */
132
+ icon: string;
133
+ /**
134
+ * Preferred: an Ant Design (or any Vue) icon component. When set the shell
135
+ * renders it via {@code <component :is>} instead of the emoji string.
136
+ */
137
+ iconComponent?: any;
138
+ }
139
+
140
+ /** A variable exposed to the prompt (matches Dify's 变量 section). */
141
+ export type VariableType = 'paragraph' | 'select' | 'text';
142
+
143
+ export interface PromptVariable {
144
+ key: string;
145
+ label: string;
146
+ type: VariableType;
147
+ required?: boolean;
148
+ options?: string[];
149
+ }
150
+
151
+ /**
152
+ * Rich variable descriptor edited by {@link VariableEditorModal}. Mirrors the
153
+ * shape used by the flow designer's StartNode input-variables so the two
154
+ * surfaces feel identical to the user.
155
+ */
156
+ export type AgentVariableType =
157
+ | 'array'
158
+ | 'boolean'
159
+ | 'file'
160
+ | 'number'
161
+ | 'object'
162
+ | 'string';
163
+
164
+ export interface AgentVariable {
165
+ /** Stable id — timestamp-generated on create, preserved on edit. */
166
+ id?: number | string;
167
+ /** Code name used in prompt templates ({@code {{#user.name#}}}). */
168
+ name: string;
169
+ /** Display label shown in forms. Falls back to {@link name} if empty. */
170
+ label?: string;
171
+ type: AgentVariableType;
172
+ required?: boolean;
173
+ description?: string;
174
+ /** Default value shown to the user; free-form string for the modal. */
175
+ defaultValue?: string;
176
+ }
177
+
178
+ /** A tool listing in the tool picker + attached-tools row. */
179
+ export interface StudioTool {
180
+ name: string;
181
+ description?: string;
182
+ /** Group used to bucket tools in the picker (built-in / marketplace / mcp). */
183
+ category?: string;
184
+ /** Icon or emoji shown next to the name. */
185
+ icon?: string;
186
+ /** Total installs — used by Dify to sort by popularity. Optional. */
187
+ installs?: number;
188
+ }
189
+
190
+ /** An attached knowledge base (dataset) row. */
191
+ export interface StudioKnowledge {
192
+ id: string;
193
+ name: string;
194
+ documentCount?: number;
195
+ }
196
+
197
+ /** One row in the model-select dropdown at the top of the orchestrate tab. */
198
+ export interface StudioModelOption {
199
+ id: string;
200
+ label: string;
201
+ /** Optional provider hint (rendered as a subtle badge). */
202
+ provider?: string;
203
+ }
204
+
205
+ /** Message shown in the right-hand 调试与预览 chat log. */
206
+ export interface StudioChatMessage {
207
+ role: 'assistant' | 'user';
208
+ content: string;
209
+ failed?: boolean;
210
+ steps?: Array<Record<string, unknown>>;
211
+ }
212
+
213
+ /** One row in the 日志与标注 table. */
214
+ export interface StudioLogEntry {
215
+ id: string;
216
+ title: string;
217
+ endUser?: string;
218
+ status: 'FAILED' | 'PENDING' | 'SUCCESS';
219
+ messageCount?: number;
220
+ userFeedback?: string;
221
+ adminFeedback?: string;
222
+ createdAt?: string;
223
+ updatedAt?: string;
224
+ }
225
+
226
+ /** A single stat card on the 监测 dashboard. */
227
+ export interface StudioMonitorMetric {
228
+ id: string;
229
+ title: string;
230
+ /** Big current-value shown at the top of the card. */
231
+ value: number | string;
232
+ /** Optional units — rendered inline after the value (e.g. "Token/秒"). */
233
+ unit?: string;
234
+ /** Optional hint text under the value (e.g. "总计 Token · ~$0.2659"). */
235
+ subtitle?: string;
236
+ /** Series of Y-values used to render the sparkline. */
237
+ series: number[];
238
+ /** X-axis labels aligned with series. */
239
+ labels?: string[];
240
+ /** Stroke color for the sparkline. */
241
+ color?: string;
242
+ }
package/src/index.ts ADDED
@@ -0,0 +1,155 @@
1
+ /**
2
+ * vue-agent-start — unified UI kit for spring-agent-start.
3
+ *
4
+ * All source lives under this one module. It absorbs what used to be four
5
+ * separate packages, now organised as sub-folders under `./`:
6
+ *
7
+ * • provider-hub — model provider gallery + credential mgmt + shared picker
8
+ * • knowledge-hub — dataset CRUD + document ingest + recall testing
9
+ * • agent-studio — app list + Dify-parity 编排/API/日志/监测 editor
10
+ * • agent-flow — visual workflow / DAG designer for LLM nodes
11
+ *
12
+ * Style side-effects (knowledge-hub tokens, etc.) are imported eagerly so
13
+ * callers don't have to remember a separate `import 'vue-agent-start/style.css'`.
14
+ */
15
+
16
+ // -----------------------------------------------------------------------------
17
+ // Style tokens — the only side-effect import.
18
+ // -----------------------------------------------------------------------------
19
+ import './knowledge-hub/styles/index.css';
20
+
21
+ // -----------------------------------------------------------------------------
22
+ // provider-hub — model provider mgmt + shared model picker
23
+ // -----------------------------------------------------------------------------
24
+ export { default as CredentialForm } from './provider-hub/components/CredentialForm.vue';
25
+ export { default as DefaultModelsPanel } from './provider-hub/components/DefaultModelsPanel.vue';
26
+ export { default as ModelCardGrid } from './provider-hub/components/ModelCardGrid.vue';
27
+ export { default as ModelParameterDrawer } from './provider-hub/components/ModelParameterDrawer.vue';
28
+ export { default as ModelPickerPopover } from './provider-hub/components/ModelPickerPopover.vue';
29
+ export { default as ProviderApp } from './provider-hub/components/ProviderApp.vue';
30
+ export { default as ProviderCredentialModal } from './provider-hub/components/ProviderCredentialModal.vue';
31
+ export { default as ProviderGallery } from './provider-hub/components/ProviderGallery.vue';
32
+ export { default as ProviderHubShell } from './provider-hub/components/ProviderHubShell.vue';
33
+ export { default as ProviderIcon } from './provider-hub/components/ProviderIcon.vue';
34
+
35
+ export * from './provider-hub/composables/useProviderHub';
36
+ export * from './provider-hub/types';
37
+
38
+ // -----------------------------------------------------------------------------
39
+ // knowledge-hub — dataset UI kit
40
+ // -----------------------------------------------------------------------------
41
+ export { default as KnowledgeApp } from './knowledge-hub/components/KnowledgeApp.vue';
42
+ export { default as KnowledgeHubApp } from './knowledge-hub/components/KnowledgeHubApp.vue';
43
+ export { default as CreateDatasetWizard } from './knowledge-hub/components/CreateDatasetWizard.vue';
44
+ export { default as DatasetCardGrid } from './knowledge-hub/components/DatasetCardGrid.vue';
45
+ export { default as DatasetDetailDrawer } from './knowledge-hub/components/DatasetDetailDrawer.vue';
46
+ export { default as DatasetSettingsPanel } from './knowledge-hub/components/DatasetSettingsPanel.vue';
47
+ export { default as DatasetSidebar } from './knowledge-hub/components/DatasetSidebar.vue';
48
+ export { default as DocumentChunksView } from './knowledge-hub/components/DocumentChunksView.vue';
49
+ export { default as DocumentTable } from './knowledge-hub/components/DocumentTable.vue';
50
+ export { default as RecallTestingPanelV2 } from './knowledge-hub/components/RecallTestingPanelV2.vue';
51
+
52
+ // Legacy widgets still used by /workflow KNOWLEDGE_RETRIEVAL node
53
+ export { default as DatasetPicker } from './knowledge-hub/components/DatasetPicker.vue';
54
+ export { default as DatasetPickerModal } from './knowledge-hub/components/DatasetPickerModal.vue';
55
+ export { default as HitTestingPanel } from './knowledge-hub/components/HitTestingPanel.vue';
56
+ export { default as RetrievedList } from './knowledge-hub/components/RetrievedList.vue';
57
+
58
+ export { createSpringAgentStartAdapter } from './knowledge-hub/adapters/springAgentStart';
59
+ export * from './knowledge-hub/composables/useKnowledge';
60
+ export * from './knowledge-hub/types';
61
+
62
+ // Shared retrieval-config UI — reusable outside the dataset drawer.
63
+ export { default as RetrievalConfigPopover } from './knowledge-hub/components/RetrievalConfigPopover.vue';
64
+ export { default as RetrievalMethodPicker } from './knowledge-hub/components/RetrievalMethodPicker.vue';
65
+
66
+ // -----------------------------------------------------------------------------
67
+ // agent-studio — app list + Dify-parity editor
68
+ // -----------------------------------------------------------------------------
69
+ export { default as AgentAppsPage } from './agent-studio/components/AgentAppsPage.vue';
70
+ export { default as AgentCardGrid } from './agent-studio/components/AgentCardGrid.vue';
71
+ export { default as AgentChatPage } from './agent-studio/components/AgentChatPage.vue';
72
+ export { default as AppDesignDrawer } from './agent-studio/components/AppDesignDrawer.vue';
73
+ export { default as CreateAppModal } from './agent-studio/components/CreateAppModal.vue';
74
+
75
+ export { default as AgentApiDocs } from './agent-studio/components/AgentApiDocs.vue';
76
+ export { default as AgentDebugPanel } from './agent-studio/components/AgentDebugPanel.vue';
77
+ export { default as AgentLogsPanel } from './agent-studio/components/AgentLogsPanel.vue';
78
+ export { default as AgentMonitorPanel } from './agent-studio/components/AgentMonitorPanel.vue';
79
+ export { default as AgentOrchestrate } from './agent-studio/components/AgentOrchestrate.vue';
80
+ export { default as AgentPromptEditor } from './agent-studio/components/AgentPromptEditor.vue';
81
+ export { default as AgentStudioShell } from './agent-studio/components/AgentStudioShell.vue';
82
+ export { default as AgentToolsPanel } from './agent-studio/components/AgentToolsPanel.vue';
83
+ export { default as AgentVariablesPanel } from './agent-studio/components/AgentVariablesPanel.vue';
84
+ export { default as SparkChart } from './agent-studio/components/SparkChart.vue';
85
+
86
+ export * from './agent-studio/composables/useAgentStudio';
87
+ export * from './agent-studio/types';
88
+
89
+ // AgentStudioApi adapter used by AgentChatPage —— 只导 factory + 接口,
90
+ // 避免 adapter 里重复定义的 AgentEntity/AgentStrategy/... 与 types.ts 冲突。
91
+ export { createAgentStudioSpringBackend } from './agent-studio/adapters/springAgentStart';
92
+ export type { AgentStudioApi } from './agent-studio/adapters/springAgentStart';
93
+
94
+ // AppStudioApi + built-in panels (LogAnnotation, Monitor, DrawerFlowDesigner)
95
+ // — a host can supply just the api callback bag and drop the drawer into a
96
+ // page without importing individual panels.
97
+ export * from './agent-studio/api';
98
+ export { default as LogAnnotationPanel } from './agent-studio/panels/LogAnnotationPanel.vue';
99
+ export { default as MonitorPanel } from './agent-studio/panels/MonitorPanel.vue';
100
+ export { default as DrawerFlowDesigner } from './agent-studio/panels/DrawerFlowDesigner.vue';
101
+
102
+ // -----------------------------------------------------------------------------
103
+ // agent-flow — visual workflow designer
104
+ //
105
+ // Also re-exports the Vue plugin as a named `AgentFlowPlugin` — callers that
106
+ // used `import AgentFlow from '@agent-start/agent-flow'; app.use(AgentFlow, …)`
107
+ // switch to `import { AgentFlowPlugin } from 'vue-agent-start'; app.use(…)`.
108
+ // -----------------------------------------------------------------------------
109
+ import FlowDesigner from './agent-flow/workflow/FlowDesigner.vue';
110
+ import NodeConfig from './agent-flow/workflow/NodeConfig.vue';
111
+ import NodeConfigCard from './agent-flow/workflow/NodeConfigCard.vue';
112
+ import CustomEdge from './agent-flow/workflow/CustomEdge.vue';
113
+ import NodeHandle from './agent-flow/workflow/NodeHandle.vue';
114
+ import Icon from './agent-flow/workflow/Icon.vue';
115
+
116
+ import { useWorkflowStore } from './agent-flow/stores/workflow';
117
+ import { provideBackend, type BackendAdapter } from './agent-flow/adapter/backend';
118
+
119
+ import nodeCatalog from './agent-flow/workflow/utils/node_config';
120
+ import nodeCardForm from './agent-flow/workflow/utils/node_card_form';
121
+ import workflowUtils from './agent-flow/workflow/utils/workflow_utils';
122
+
123
+ export {
124
+ FlowDesigner,
125
+ NodeConfig,
126
+ NodeConfigCard,
127
+ CustomEdge,
128
+ NodeHandle,
129
+ Icon,
130
+ useWorkflowStore,
131
+ provideBackend,
132
+ nodeCatalog,
133
+ nodeCardForm,
134
+ workflowUtils,
135
+ };
136
+
137
+ export type { BackendAdapter };
138
+
139
+ export interface AgentFlowInstallOptions {
140
+ backend?: BackendAdapter;
141
+ registerGlobal?: boolean;
142
+ }
143
+
144
+ /** Vue plugin install for the workflow designer. */
145
+ export const AgentFlowPlugin = {
146
+ install(app: import('vue').App, options: AgentFlowInstallOptions = {}) {
147
+ if (options.backend) {
148
+ provideBackend(app, options.backend);
149
+ }
150
+ if (options.registerGlobal !== false) {
151
+ app.component('FlowDesigner', FlowDesigner);
152
+ app.component('NodeConfigCard', NodeConfigCard);
153
+ }
154
+ },
155
+ };