@metad/contracts 3.6.7 → 3.8.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 (293) hide show
  1. package/README.md +2 -2
  2. package/index.cjs.d.ts +1 -0
  3. package/index.cjs.js +4044 -5
  4. package/index.esm.d.ts +1 -0
  5. package/index.esm.js +3911 -0
  6. package/package.json +6 -2
  7. package/src/agent/{ai-model.ts → ai-model.d.ts} +2 -2
  8. package/src/agent/graph.d.ts +167 -0
  9. package/src/agent/index.d.ts +6 -0
  10. package/src/agent/interrupt.d.ts +51 -0
  11. package/src/agent/token.d.ts +21 -0
  12. package/src/agent/utils.d.ts +19 -0
  13. package/src/agent/variables.d.ts +16 -0
  14. package/src/ai/ai-model.model.d.ts +198 -0
  15. package/src/ai/ai-provider.model.d.ts +43 -0
  16. package/src/ai/ai.model.d.ts +82 -0
  17. package/src/ai/chat-message-feedback.model.d.ts +24 -0
  18. package/src/ai/chat-message.model.d.ts +92 -0
  19. package/src/ai/chat.model.d.ts +185 -0
  20. package/src/ai/copilot-checkpoint.model.d.ts +23 -0
  21. package/src/ai/copilot-example.model.d.ts +19 -0
  22. package/src/ai/copilot-model.model.d.ts +30 -0
  23. package/src/ai/copilot-organization.model.d.ts +17 -0
  24. package/src/ai/copilot-provider.model.d.ts +31 -0
  25. package/src/ai/copilot-role.model.d.ts +43 -0
  26. package/src/ai/copilot-store.model.d.ts +29 -0
  27. package/src/ai/copilot-user.model.d.ts +27 -0
  28. package/src/ai/copilot.model.d.ts +36 -0
  29. package/src/ai/{environment.model.ts → environment.model.d.ts} +10 -12
  30. package/src/ai/feature.model.d.ts +6 -0
  31. package/src/ai/index.d.ts +44 -0
  32. package/src/ai/knowledge-doc-chunk.model.d.ts +61 -0
  33. package/src/ai/knowledge-doc-page.model.d.ts +15 -0
  34. package/src/ai/knowledge-doc.model.d.ts +222 -0
  35. package/src/ai/knowledge-pipeline.d.ts +107 -0
  36. package/src/ai/knowledge-retrieval-log.model.d.ts +10 -0
  37. package/src/ai/knowledgebase-task.model.d.ts +39 -0
  38. package/src/ai/knowledgebase.model.d.ts +174 -0
  39. package/src/ai/middleware.model.d.ts +23 -0
  40. package/src/ai/rag-web.d.ts +26 -0
  41. package/src/ai/rag.d.ts +24 -0
  42. package/src/ai/role-permissions.d.ts +13 -0
  43. package/src/ai/sandbox.d.ts +6 -0
  44. package/src/ai/skill.model.d.ts +181 -0
  45. package/src/ai/types.d.ts +77 -0
  46. package/src/ai/xpert-agent-execution.model.d.ts +96 -0
  47. package/src/ai/xpert-agent.model.d.ts +222 -0
  48. package/src/ai/xpert-project.model.d.ts +86 -0
  49. package/src/ai/xpert-table.model.d.ts +84 -0
  50. package/src/ai/xpert-task.model.d.ts +26 -0
  51. package/src/ai/xpert-template.model.d.ts +47 -0
  52. package/src/ai/xpert-tool-mcp.model.d.ts +72 -0
  53. package/src/ai/xpert-tool.model.d.ts +154 -0
  54. package/src/ai/xpert-toolset.model.d.ts +200 -0
  55. package/src/ai/xpert-workflow-task.prompt.d.ts +2 -0
  56. package/src/ai/xpert-workflow.model.d.ts +445 -0
  57. package/src/ai/xpert-workspace.model.d.ts +32 -0
  58. package/src/ai/xpert.model.d.ts +502 -0
  59. package/src/ai/xpert.utils.d.ts +84 -0
  60. package/src/analytics/ai.d.ts +73 -0
  61. package/src/analytics/approval-policy.model.d.ts +30 -0
  62. package/src/analytics/business-area-user.model.d.ts +35 -0
  63. package/src/analytics/business-area.d.ts +17 -0
  64. package/src/analytics/certification.model.d.ts +11 -0
  65. package/src/analytics/chatbi-conversation.model.d.ts +15 -0
  66. package/src/analytics/chatbi-model.model.d.ts +18 -0
  67. package/src/analytics/collection.model.d.ts +6 -0
  68. package/src/analytics/comment.model.d.ts +10 -0
  69. package/src/analytics/data-source-type.d.ts +16 -0
  70. package/src/analytics/data-source.d.ts +62 -0
  71. package/src/analytics/favorite.d.ts +14 -0
  72. package/src/analytics/features.d.ts +19 -0
  73. package/src/analytics/feed-model.d.ts +13 -0
  74. package/src/analytics/gateway.d.ts +28 -0
  75. package/src/analytics/index.d.ts +38 -0
  76. package/src/analytics/indicator-app.d.ts +44 -0
  77. package/src/analytics/{indicator-market.ts → indicator-market.d.ts} +2 -6
  78. package/src/analytics/indicator.d.ts +105 -0
  79. package/src/analytics/model-query-log.model.d.ts +41 -0
  80. package/src/analytics/model-query.d.ts +21 -0
  81. package/src/analytics/{notification-destination.ts → notification-destination.d.ts} +5 -9
  82. package/src/analytics/{permission-approval-user.model.ts → permission-approval-user.model.d.ts} +8 -10
  83. package/src/analytics/permission-approval.model.d.ts +47 -0
  84. package/src/analytics/project.model.d.ts +50 -0
  85. package/src/analytics/role-permissions.d.ts +25 -0
  86. package/src/analytics/schema.d.ts +262 -0
  87. package/src/analytics/screenshot.model.d.ts +25 -0
  88. package/src/analytics/semantic-model-entity.d.ts +38 -0
  89. package/src/analytics/semantic-model-member.d.ts +27 -0
  90. package/src/analytics/semantic-model.d.ts +183 -0
  91. package/src/analytics/{story-point.ts → story-point.d.ts} +6 -11
  92. package/src/analytics/story-template.model.d.ts +28 -0
  93. package/src/analytics/story-widget.d.ts +12 -0
  94. package/src/analytics/story.d.ts +93 -0
  95. package/src/analytics/subscription.d.ts +38 -0
  96. package/src/analytics/visit.model.d.ts +34 -0
  97. package/src/analytics/webSocket.d.ts +48 -0
  98. package/src/api-key.model.d.ts +10 -0
  99. package/src/base-entity.model.d.ts +27 -0
  100. package/src/contact.model.d.ts +41 -0
  101. package/src/core.model.d.ts +97 -0
  102. package/src/{country.model.ts → country.model.d.ts} +2 -3
  103. package/src/currency.model.d.ts +579 -0
  104. package/src/{custom-smtp.model.ts → custom-smtp.model.d.ts} +17 -21
  105. package/src/date-picker.model.d.ts +5 -0
  106. package/src/email-template.model.d.ts +39 -0
  107. package/src/email.model.d.ts +36 -0
  108. package/src/employee.model.d.ts +128 -0
  109. package/src/entity-with-members.model.d.ts +13 -0
  110. package/src/feature.model.d.ts +93 -0
  111. package/src/file-provider.d.ts +33 -0
  112. package/src/help-center-article.model.d.ts +0 -0
  113. package/src/help-center.model.d.ts +0 -0
  114. package/src/http-status.enum.d.ts +57 -0
  115. package/src/import-export.model.d.ts +36 -0
  116. package/src/index.d.ts +48 -0
  117. package/src/integration/dify.d.ts +0 -0
  118. package/src/integration/dingtalk.d.ts +2 -0
  119. package/src/integration/fastgpt.d.ts +0 -0
  120. package/src/integration/firecrawl.d.ts +2 -0
  121. package/src/integration/github.d.ts +69 -0
  122. package/src/integration/index.d.ts +4 -0
  123. package/src/integration/lark.d.ts +5 -0
  124. package/src/integration/wecom.d.ts +2 -0
  125. package/src/integration.model.d.ts +85 -0
  126. package/src/invite.model.d.ts +123 -0
  127. package/src/language.model.d.ts +19 -0
  128. package/src/organization-contact.model.d.ts +72 -0
  129. package/src/{organization-department.model.ts → organization-department.model.d.ts} +10 -16
  130. package/src/organization-language.model.d.ts +18 -0
  131. package/src/organization-projects.model.d.ts +80 -0
  132. package/src/organization-team-employee-model.d.ts +12 -0
  133. package/src/organization-team-model.d.ts +19 -0
  134. package/src/organization.model.d.ts +238 -0
  135. package/src/{password-reset.model.ts → password-reset.model.d.ts} +10 -14
  136. package/src/{plain-object.model.ts → plain-object.model.d.ts} +1 -1
  137. package/src/plugin.d.ts +21 -0
  138. package/src/role-permission.model.d.ts +61 -0
  139. package/src/role.model.d.ts +26 -0
  140. package/src/schedule.d.ts +27 -0
  141. package/src/secret-token.model.d.ts +11 -0
  142. package/src/seed.model.d.ts +37 -0
  143. package/src/storage-file.model.d.ts +40 -0
  144. package/src/tag-entity.model.d.ts +20 -0
  145. package/src/tenant.model.d.ts +40 -0
  146. package/src/tools/index.d.ts +1 -0
  147. package/src/tools/sandbox.d.ts +5 -0
  148. package/src/translation.model.d.ts +26 -0
  149. package/src/types.d.ts +245 -0
  150. package/src/user-organization.model.d.ts +24 -0
  151. package/src/user.model.d.ts +131 -0
  152. package/src/visibility.model.d.ts +6 -0
  153. package/.babelrc +0 -5
  154. package/.eslintrc.json +0 -18
  155. package/babel.config.json +0 -1
  156. package/jest.config.ts +0 -16
  157. package/project.json +0 -53
  158. package/src/agent/graph.ts +0 -275
  159. package/src/agent/index.ts +0 -5
  160. package/src/agent/token.ts +0 -23
  161. package/src/agent/utils.spec.ts +0 -283
  162. package/src/agent/utils.ts +0 -122
  163. package/src/agent/variables.ts +0 -66
  164. package/src/ai/ai-model.model.ts +0 -232
  165. package/src/ai/ai-provider.model.ts +0 -53
  166. package/src/ai/ai.model.ts +0 -87
  167. package/src/ai/chat-message-feedback.model.ts +0 -31
  168. package/src/ai/chat-message.model.ts +0 -277
  169. package/src/ai/chat.model.ts +0 -207
  170. package/src/ai/copilot-checkpoint.model.ts +0 -25
  171. package/src/ai/copilot-example.model.ts +0 -23
  172. package/src/ai/copilot-model.model.ts +0 -31
  173. package/src/ai/copilot-organization.model.ts +0 -21
  174. package/src/ai/copilot-provider.model.ts +0 -46
  175. package/src/ai/copilot-role.model.ts +0 -48
  176. package/src/ai/copilot-store.model.ts +0 -34
  177. package/src/ai/copilot-user.model.ts +0 -24
  178. package/src/ai/copilot.model.ts +0 -47
  179. package/src/ai/feature.model.ts +0 -6
  180. package/src/ai/index.ts +0 -40
  181. package/src/ai/knowledge-doc-chunk.model.ts +0 -123
  182. package/src/ai/knowledge-doc-chunk.spec.ts +0 -47
  183. package/src/ai/knowledge-doc-page.model.ts +0 -20
  184. package/src/ai/knowledge-doc.model.ts +0 -364
  185. package/src/ai/knowledge-pipeline.ts +0 -138
  186. package/src/ai/knowledge-retrieval-log.model.ts +0 -19
  187. package/src/ai/knowledgebase-task.model.ts +0 -46
  188. package/src/ai/knowledgebase.model.ts +0 -205
  189. package/src/ai/rag-web.ts +0 -54
  190. package/src/ai/rag.ts +0 -24
  191. package/src/ai/role-permissions.ts +0 -13
  192. package/src/ai/types.ts +0 -83
  193. package/src/ai/xpert-agent-execution.model.ts +0 -115
  194. package/src/ai/xpert-agent.model.ts +0 -264
  195. package/src/ai/xpert-project.model.ts +0 -103
  196. package/src/ai/xpert-table.model.ts +0 -100
  197. package/src/ai/xpert-task.model.ts +0 -32
  198. package/src/ai/xpert-template.model.ts +0 -53
  199. package/src/ai/xpert-tool-mcp.model.ts +0 -77
  200. package/src/ai/xpert-tool.model.ts +0 -216
  201. package/src/ai/xpert-toolset.model.ts +0 -220
  202. package/src/ai/xpert-workflow-task.prompt.ts +0 -71
  203. package/src/ai/xpert-workflow.model.ts +0 -502
  204. package/src/ai/xpert-workspace.model.ts +0 -42
  205. package/src/ai/xpert.model.ts +0 -637
  206. package/src/ai/xpert.utils.ts +0 -214
  207. package/src/analytics/ai.ts +0 -79
  208. package/src/analytics/approval-policy.model.ts +0 -40
  209. package/src/analytics/business-area-user.model.ts +0 -43
  210. package/src/analytics/business-area.ts +0 -20
  211. package/src/analytics/certification.model.ts +0 -12
  212. package/src/analytics/chatbi-conversation.model.ts +0 -16
  213. package/src/analytics/chatbi-model.model.ts +0 -22
  214. package/src/analytics/collection.model.ts +0 -8
  215. package/src/analytics/comment.model.ts +0 -14
  216. package/src/analytics/data-source-type.ts +0 -19
  217. package/src/analytics/data-source.ts +0 -72
  218. package/src/analytics/favorite.ts +0 -18
  219. package/src/analytics/features.ts +0 -19
  220. package/src/analytics/feed-model.ts +0 -15
  221. package/src/analytics/gateway.ts +0 -31
  222. package/src/analytics/index.ts +0 -39
  223. package/src/analytics/indicator-app.ts +0 -49
  224. package/src/analytics/indicator.ts +0 -143
  225. package/src/analytics/model-query-log.model.ts +0 -45
  226. package/src/analytics/model-query.ts +0 -22
  227. package/src/analytics/permission-approval.model.ts +0 -58
  228. package/src/analytics/project.model.ts +0 -56
  229. package/src/analytics/role-permissions.ts +0 -36
  230. package/src/analytics/schema.ts +0 -300
  231. package/src/analytics/screenshot.model.ts +0 -28
  232. package/src/analytics/semantic-model-entity.ts +0 -50
  233. package/src/analytics/semantic-model-member.ts +0 -49
  234. package/src/analytics/semantic-model.ts +0 -237
  235. package/src/analytics/story-template.model.ts +0 -34
  236. package/src/analytics/story-widget.ts +0 -15
  237. package/src/analytics/story.ts +0 -109
  238. package/src/analytics/subscription.ts +0 -43
  239. package/src/analytics/visit.model.ts +0 -39
  240. package/src/analytics/webSocket.ts +0 -53
  241. package/src/api-key.model.ts +0 -11
  242. package/src/base-entity.model.ts +0 -34
  243. package/src/contact.model.ts +0 -45
  244. package/src/core.model.ts +0 -103
  245. package/src/currency.model.ts +0 -582
  246. package/src/date-picker.model.ts +0 -5
  247. package/src/email-template.model.ts +0 -50
  248. package/src/email.model.ts +0 -46
  249. package/src/employee.model.ts +0 -199
  250. package/src/entity-with-members.model.ts +0 -16
  251. package/src/feature.model.ts +0 -108
  252. package/src/file-provider.ts +0 -37
  253. package/src/help-center-article.model.ts +0 -35
  254. package/src/help-center.model.ts +0 -33
  255. package/src/http-status.enum.ts +0 -58
  256. package/src/import-export.model.ts +0 -42
  257. package/src/index.ts +0 -60
  258. package/src/integration/dify.ts +0 -31
  259. package/src/integration/dingtalk.ts +0 -16
  260. package/src/integration/fastgpt.ts +0 -32
  261. package/src/integration/firecrawl.ts +0 -46
  262. package/src/integration/github.ts +0 -149
  263. package/src/integration/index.ts +0 -15
  264. package/src/integration/lark.ts +0 -79
  265. package/src/integration/wecom.ts +0 -16
  266. package/src/integration.model.ts +0 -119
  267. package/src/invite.model.ts +0 -144
  268. package/src/language.model.ts +0 -22
  269. package/src/organization-contact.model.ts +0 -84
  270. package/src/organization-language.model.ts +0 -24
  271. package/src/organization-projects.model.ts +0 -99
  272. package/src/organization-team-employee-model.ts +0 -14
  273. package/src/organization-team-model.ts +0 -25
  274. package/src/organization.model.ts +0 -266
  275. package/src/plugin.ts +0 -15
  276. package/src/role-permission.model.ts +0 -123
  277. package/src/role.model.ts +0 -31
  278. package/src/schedule.ts +0 -71
  279. package/src/secret-token.model.ts +0 -15
  280. package/src/seed.model.ts +0 -50
  281. package/src/storage-file.model.ts +0 -46
  282. package/src/tag-entity.model.ts +0 -23
  283. package/src/tenant.model.ts +0 -52
  284. package/src/tools/index.ts +0 -1
  285. package/src/tools/sandbox.ts +0 -5
  286. package/src/translation.model.ts +0 -37
  287. package/src/types.ts +0 -277
  288. package/src/user-organization.model.ts +0 -31
  289. package/src/user.model.ts +0 -151
  290. package/src/visibility.model.ts +0 -6
  291. package/tsconfig.json +0 -22
  292. package/tsconfig.lib.json +0 -10
  293. package/tsconfig.spec.json +0 -9
@@ -1,205 +0,0 @@
1
- import { ICopilotModel } from './copilot-model.model'
2
- import { I18nObject, TAvatar } from '../types'
3
- import { IBasePerWorkspaceEntityModel } from './xpert-workspace.model'
4
- import { IKnowledgeDocument } from './knowledge-doc.model'
5
- import { IXpert } from './xpert.model'
6
- import { IIntegration } from '../integration.model'
7
- import { channelName } from '../agent/graph'
8
- import { IDocChunkMetadata } from './knowledge-doc-chunk.model'
9
-
10
- /**
11
- * Non-internal types should remain the same as IntegrationEnum.
12
- */
13
- export enum KnowledgeProviderEnum {
14
- Internal = 'internal',
15
- }
16
-
17
- export enum KnowledgebaseTypeEnum {
18
- Standard = 'standard',
19
- External = 'external'
20
- }
21
-
22
- export enum KnowledgeStructureEnum {
23
- General = 'general',
24
- ParentChild = 'parent-child',
25
- QA = 'qa'
26
- }
27
-
28
- export type KnowledgebaseParserConfig = {
29
- pages?: number[][]
30
- embeddingBatchSize?: number
31
- chunkSize: number | null
32
- chunkOverlap: number | null
33
- delimiter: string | null
34
- }
35
-
36
- /**
37
- * Type of rag knowledgebase
38
- */
39
- export type TKnowledgebase = {
40
- /**
41
- * KB name
42
- */
43
- name: string
44
-
45
- /**
46
- * Type of KB
47
- */
48
- type: KnowledgebaseTypeEnum
49
-
50
- /**
51
- * English | Chinese
52
- */
53
- language?: 'Chinese' | 'English' | null
54
- /**
55
- * Avatar object
56
- */
57
- avatar?: TAvatar
58
- /**
59
- * KB description
60
- */
61
- description?: string
62
- /**
63
- * Public in tenant or in organization or private
64
- * @default private
65
- */
66
- permission?: KnowledgebasePermission
67
-
68
- /**
69
- * Copilot model for knowledgebase
70
- */
71
- copilotModel?: ICopilotModel
72
- copilotModelId?: string
73
-
74
- // Rerank model for re-ranking retrieved chunks
75
- rerankModel?: ICopilotModel
76
- rerankModelId?: string
77
-
78
- // Vision model for image understanding
79
- visionModel?: ICopilotModel
80
- visionModelId?: string
81
-
82
- documentNum?: number | null
83
- tokenNum?: number | null
84
- chunkNum?: number | null
85
- /**
86
- *@deprecated use `recall`
87
- */
88
- similarityThreshold?: number
89
- vectorSimilarityWeight?: number
90
- /**
91
- * @deprecated
92
- * default parser ID
93
- */
94
- parserId?: string
95
-
96
- parserConfig?: KnowledgebaseParserConfig
97
-
98
- /**
99
- * Index structure determines how the knowledge base organizes and indexes your document content.
100
- * @deprecated
101
- */
102
- structure?: KnowledgeStructureEnum
103
-
104
- /**
105
- * Recall params for kb chunks
106
- */
107
- recall?: TKBRecallParams
108
-
109
- status?: string
110
-
111
- /**
112
- * Metadata custom field definition array
113
- */
114
- metadataSchema?: KBMetadataFieldDef[]
115
-
116
- /**
117
- * API service enabled
118
- */
119
- apiEnabled?: boolean
120
-
121
- documents?: IKnowledgeDocument[]
122
-
123
- integrationId?: string
124
- extKnowledgebaseId?: string
125
- pipelineId?: string
126
- }
127
-
128
- /**
129
- * Knowledgebase Entity
130
- */
131
- export interface IKnowledgebase extends TKnowledgebase, IBasePerWorkspaceEntityModel {
132
- xperts?: IXpert[]
133
- integration?: IIntegration
134
- pipeline?: IXpert
135
- }
136
-
137
- /**
138
- * Knowledgebase permission levels
139
- */
140
- export enum KnowledgebasePermission {
141
- /**
142
- * Only visible to you
143
- * @default
144
- */
145
- Private = 'private',
146
- /**
147
- * Visible to all members in the organization
148
- */
149
- Organization = 'organization',
150
- /**
151
- * Visible to all members in the tenant
152
- */
153
- Public = 'public'
154
- }
155
-
156
- /**
157
- * Recall parameters
158
- */
159
- export type TKBRecallParams = {
160
- /**
161
- * Top K of result chunks
162
- */
163
- topK?: number
164
- /**
165
- * At least the similarity threshold
166
- */
167
- score?: number
168
-
169
- /**
170
- * Weight in EnsembleRetriever
171
- */
172
- weight?: number
173
- }
174
-
175
- export type DocumentMetadata = IDocChunkMetadata & {
176
- score?: number;
177
- relevanceScore?: number
178
- } & Record<string, any>;
179
-
180
- export type MetadataFieldType =
181
- | 'string' | 'number' | 'boolean' | 'enum' | 'datetime' | 'string[]' | 'number[]' | 'object';
182
-
183
- export type KBMetadataFieldDef = {
184
- key: string; // Unique key, e.g. "department"
185
- label?: I18nObject; // Display label
186
- type: MetadataFieldType;
187
- enumValues?: string[];
188
- description?: string;
189
- }
190
-
191
- /**
192
- * Channel name for knowledgebase pipeline
193
- */
194
- export const KnowledgebaseChannel = channelName('knowledgebase')
195
- /**
196
- * Task ID of a knowledgebase run
197
- */
198
- export const KnowledgeTask = 'task_id'
199
- /**
200
- * Specify the data source to run
201
- */
202
- export const KNOWLEDGE_SOURCES_NAME = 'sources'
203
- export const KNOWLEDGE_DOCUMENTS_NAME = 'documents'
204
- export const KNOWLEDGE_FOLDER_ID_NAME = 'folder_id'
205
- export const KNOWLEDGE_STAGE_NAME = 'stage'
package/src/ai/rag-web.ts DELETED
@@ -1,54 +0,0 @@
1
- import { IntegrationEnum } from "../integration.model";
2
- import { TParameter, TSelectOption } from "../types";
3
- import { IKnowledgeDocumentPage } from "./knowledge-doc-page.model";
4
-
5
- export enum KDocumentWebTypeEnum {
6
- Playwright = 'playwright',
7
- FireCrawl = 'firecrawl',
8
- Notion = 'notion'
9
- }
10
-
11
- export type TRagWebOptions = {
12
- url: string
13
- params?: Record<string, unknown>
14
- }
15
-
16
- export type TKDocumentWebSchema = {
17
- type: KDocumentWebTypeEnum,
18
- helpUrl: string,
19
- options: TParameter[]
20
- /**
21
- * Need to provide integration of provider
22
- */
23
- integrationProvider?: IntegrationEnum
24
- }
25
-
26
- export type TRagWebResult = {
27
- docs: IKnowledgeDocumentPage[]
28
- duration: number
29
- }
30
-
31
- export const KDocumentWebTypeOptions: TSelectOption<KDocumentWebTypeEnum>[] = [
32
- {
33
- value: KDocumentWebTypeEnum.Playwright,
34
- label: {
35
- en_US: 'Playwright'
36
- },
37
- icon: `<svg width="100%" height="100%" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
38
- <path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
39
- <path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
40
- <path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
41
- <path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
42
- <path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
43
- <path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
44
- <path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
45
- </svg>`
46
- },
47
- {
48
- value: KDocumentWebTypeEnum.FireCrawl,
49
- label: {
50
- en_US: 'FireCrawl'
51
- },
52
- icon: `🔥`,
53
- }
54
- ]
package/src/ai/rag.ts DELETED
@@ -1,24 +0,0 @@
1
- export enum VectorTypeEnum {
2
- ANALYTICDB = 'analyticdb',
3
- CHROMA = 'chroma',
4
- MILVUS = 'milvus',
5
- MYSCALE = 'myscale',
6
- PGVECTOR = 'pgvector',
7
- PGVECTO_RS = 'pgvecto-rs',
8
- QDRANT = 'qdrant',
9
- RELYT = 'relyt',
10
- TIDB_VECTOR = 'tidb_vector',
11
- WEAVIATE = 'weaviate',
12
- OPENSEARCH = 'opensearch',
13
- TENCENT = 'tencent',
14
- ORACLE = 'oracle',
15
- ELASTICSEARCH = 'elasticsearch',
16
- ELASTICSEARCH_JA = 'elasticsearch-ja',
17
- LINDORM = 'lindorm',
18
- COUCHBASE = 'couchbase',
19
- BAIDU = 'baidu',
20
- VIKINGDB = 'vikingdb',
21
- UPSTASH = 'upstash',
22
- TIDB_ON_QDRANT = 'tidb_on_qdrant',
23
- OCEANBASE = 'oceanbase'
24
- }
@@ -1,13 +0,0 @@
1
- export enum AIPermissionsEnum {
2
- /**
3
- * Create or edit Knowledgebase in organization.
4
- */
5
- KNOWLEDGEBASE_EDIT = 'KNOWLEDGEBASE_EDIT',
6
- COPILOT_VIEW = 'COPILOT_VIEW',
7
- COPILOT_EDIT = 'COPILOT_EDIT',
8
- /**
9
- * Create or edit Xperts in organization.
10
- */
11
- XPERT_EDIT = 'XPERT_EDIT',
12
- CHAT_VIEW = 'CHAT_VIEW',
13
- }
package/src/ai/types.ts DELETED
@@ -1,83 +0,0 @@
1
- import { TSelectOption } from "../types";
2
- import { TXpertAttachmentType, XpertParameterTypeEnum } from "./xpert.model"
3
-
4
- export type TErrorHandling = {
5
- type?: null | 'defaultValue' | 'failBranch'
6
- defaultValue?: {content?: string; } & Record<string, any>
7
- failBranch?: string
8
- }
9
-
10
- export enum ApiAuthType {
11
- /**
12
- * Enum class for api provider auth type.
13
- */
14
- NONE = "none",
15
- API_KEY = "api_key",
16
- BASIC = 'basic'
17
- }
18
-
19
- /**
20
- * Reference variable (parameter)
21
- */
22
- export type TXpertRefParameter = {
23
- type?: XpertParameterTypeEnum
24
- name: string
25
- optional?: boolean
26
- /**
27
- * Referencing other variable
28
- */
29
- variable?: string
30
- }
31
-
32
- /**
33
- * Embedding status of an entity, such as an bi indicator or kb document.
34
- */
35
- export enum EmbeddingStatusEnum {
36
- PROCESSING = 'processing',
37
- SUCCESS = 'success',
38
- FAILED = 'failed',
39
- REQUIRED = 'required',
40
- }
41
-
42
- export const Attachment_Type_Options: TSelectOption<string, TXpertAttachmentType>[] = [
43
- {
44
- key: 'document',
45
- value: 'TXT, MD, MDX, MARKDOWN, PDF, HTML, XLSX, XLS, DOC, DOCX, CSV, EML, MSG, PPTX, PPT, XML, EPUB',
46
- label: {
47
- zh_Hans: '文档',
48
- en_US: 'Document',
49
- },
50
- },
51
- {
52
- key: 'image',
53
- value: 'JPG, JPEG, PNG, GIF, WEBP, SVG',
54
- label: {
55
- zh_Hans: '图片',
56
- en_US: 'Image',
57
- },
58
- },
59
- {
60
- key: 'audio',
61
- value: 'MP3, M4A, WAV, AMR, MPGA',
62
- label: {
63
- zh_Hans: '音频',
64
- en_US: 'Audio',
65
- },
66
- },
67
- {
68
- key: 'video',
69
- value: 'MP4, MOV, MPEG, WEBM',
70
- label: {
71
- zh_Hans: '视频',
72
- en_US: 'Video',
73
- },
74
- },
75
- {
76
- key: 'others',
77
- value: '',
78
- label: {
79
- zh_Hans: '其他文件类型',
80
- en_US: 'Other file types',
81
- },
82
- }
83
- ]
@@ -1,115 +0,0 @@
1
- import { StoredMessage } from '@langchain/core/messages'
2
- import { IBasePerTenantAndOrganizationEntityModel } from '../base-entity.model'
3
- import { IXpert, TXpertTeamNodeType } from './xpert.model'
4
- import { IXpertAgent } from './xpert-agent.model'
5
- import { TSensitiveOperation } from './chat.model'
6
- import { WorkflowNodeTypeEnum } from './xpert-workflow.model'
7
-
8
- export type TXpertExecution = {
9
- category?: TXpertTeamNodeType
10
- type?: WorkflowNodeTypeEnum | string
11
- title?: string
12
- inputs?: any
13
- outputs?: any
14
- status?: XpertAgentExecutionStatusEnum
15
- error?: string
16
- elapsedTime?: number
17
-
18
- // State of graph
19
- threadId?: string
20
- checkpointNs?: string
21
- checkpointId?: string
22
- channelName?: string
23
- parent_thread_id?: string
24
-
25
- // Many to one
26
- /**
27
- * Include workflow node key
28
- */
29
- agentKey?: string
30
- predecessor?: string
31
- xpert?: IXpert
32
- xpertId?: string
33
- // Parent AgentExecution
34
- parentId?: string
35
- }
36
-
37
- /**
38
- * Corresponds to the run in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
39
- */
40
- export type TXpertAgentExecution = TXpertExecution & {
41
- /**
42
- * Total token usage of chat model
43
- */
44
- tokens?: number
45
- /**
46
- * Token usage of embedding
47
- */
48
- embedTokens?: number
49
- metadata?: TAgentExecutionMetadata
50
-
51
- /**
52
- * Latency of response from provider (s)
53
- */
54
- responseLatency?: number
55
- // Token usage
56
- totalPrice?: number
57
- currency?: string
58
- inputTokens?: number
59
- inputUnitPrice?: number
60
- inputPriceUnit?: number
61
- outputTokens?: number
62
- outputUnitPrice?: number
63
- outputPriceUnit?: number
64
-
65
- /**
66
- * Latest operation when interrupted
67
- */
68
- operation?: TSensitiveOperation
69
-
70
- // Stored messages or from checkpoints
71
- messages?: StoredMessage[]
72
-
73
- // Temporary properties
74
- agent?: IXpertAgent
75
- totalTokens?: number
76
- /**
77
- * Summary of conversation
78
- */
79
- summary?: string
80
- }
81
-
82
- /**
83
- * Execution of agent or workflow nodes.
84
- *
85
- * Corresponds to the run in the [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
86
- */
87
- export interface IXpertAgentExecution extends IBasePerTenantAndOrganizationEntityModel, TXpertAgentExecution {
88
- subExecutions?: IXpertAgentExecution[]
89
-
90
- // Temporary properties
91
- runningExecution?: IXpertAgentExecution
92
- }
93
-
94
- /**
95
- * Corresponds to the status of Run in [Agent Protocol](https://github.com/langchain-ai/agent-protocol).
96
- */
97
- export enum XpertAgentExecutionStatusEnum {
98
- RUNNING = 'running',
99
- SUCCESS = 'success',
100
- ERROR = 'error',
101
- PENDING = 'pending',
102
- TIMEOUT = 'timeout',
103
- INTERRUPTED = 'interrupted'
104
- }
105
-
106
- export type TAgentExecutionMetadata = {
107
- /**
108
- * AI model provider
109
- */
110
- provider: string
111
- /**
112
- * AI Model
113
- */
114
- model: string
115
- }