@next-bricks/ai-portal 0.43.0 → 0.44.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 (136) hide show
  1. package/dist/bricks.json +29 -29
  2. package/dist/chunks/103.8b767f50.js +3 -0
  3. package/dist/chunks/103.8b767f50.js.map +1 -0
  4. package/dist/chunks/1306.b74e72b7.js +3 -0
  5. package/dist/chunks/{3689.2a3f6d8c.js.LICENSE.txt → 1306.b74e72b7.js.LICENSE.txt} +0 -2
  6. package/dist/chunks/1306.b74e72b7.js.map +1 -0
  7. package/dist/chunks/{9828.6afc1a0f.js → 3971.8fbc97d3.js} +2 -3
  8. package/dist/chunks/3971.8fbc97d3.js.map +1 -0
  9. package/dist/chunks/495.27e0d477.js +2 -0
  10. package/dist/chunks/495.27e0d477.js.map +1 -0
  11. package/dist/chunks/7954.a92311a2.js +2 -0
  12. package/dist/chunks/7954.a92311a2.js.map +1 -0
  13. package/dist/chunks/9146.40d628b8.js +2 -0
  14. package/dist/chunks/9146.40d628b8.js.map +1 -0
  15. package/dist/chunks/chat-box.0e8ed3b2.js +2 -0
  16. package/dist/chunks/chat-box.0e8ed3b2.js.map +1 -0
  17. package/dist/chunks/chat-input.2bf76ff7.js +3 -0
  18. package/dist/chunks/chat-input.2bf76ff7.js.map +1 -0
  19. package/dist/chunks/chat-stream.40fc8941.js +2 -0
  20. package/dist/chunks/chat-stream.40fc8941.js.map +1 -0
  21. package/dist/chunks/cruise-canvas.f9ae5c01.js +2 -0
  22. package/dist/chunks/cruise-canvas.f9ae5c01.js.map +1 -0
  23. package/dist/chunks/elevo-sidebar.6f74b954.js +3 -0
  24. package/dist/chunks/elevo-sidebar.6f74b954.js.LICENSE.txt +9 -0
  25. package/dist/chunks/elevo-sidebar.6f74b954.js.map +1 -0
  26. package/dist/chunks/main.c4e180ef.js +2 -0
  27. package/dist/chunks/main.c4e180ef.js.map +1 -0
  28. package/dist/chunks/show-case.e7d8f1a7.js +2 -0
  29. package/dist/chunks/show-case.e7d8f1a7.js.map +1 -0
  30. package/dist/examples.json +17 -20
  31. package/dist/index.340c5e1d.js +2 -0
  32. package/dist/index.340c5e1d.js.map +1 -0
  33. package/dist/manifest.json +176 -186
  34. package/dist/types.json +634 -1501
  35. package/dist-types/chat-stream/Aside/Aside.d.ts +1 -1
  36. package/dist-types/chat-stream/AssistantMessage/AssistantMessage.d.ts +1 -2
  37. package/dist-types/chat-stream/ChatStream.d.ts +1 -1
  38. package/dist-types/chat-stream/NodeJob/NodeJob.d.ts +1 -2
  39. package/dist-types/chat-stream/NodeView/NodeView.d.ts +1 -1
  40. package/dist-types/chat-stream/i18n.d.ts +0 -1
  41. package/dist-types/chat-stream/index.d.ts +7 -3
  42. package/dist-types/chat-stream/interfaces.d.ts +1 -1
  43. package/dist-types/chat-stream/useConversationStream.d.ts +2 -2
  44. package/dist-types/cruise-canvas/CanvasContext.d.ts +2 -1
  45. package/dist-types/cruise-canvas/FileList/FileList.d.ts +1 -1
  46. package/dist-types/cruise-canvas/FilePreview/FilePreview.d.ts +1 -1
  47. package/dist-types/cruise-canvas/Nav/Nav.d.ts +2 -2
  48. package/dist-types/cruise-canvas/NodeJob/NodeJob.d.ts +1 -1
  49. package/dist-types/cruise-canvas/NodeReplay/NodeReplay.d.ts +2 -1
  50. package/dist-types/cruise-canvas/NodeView/NodeView.d.ts +1 -1
  51. package/dist-types/cruise-canvas/ToolCallDetail/ToolCallDetail.d.ts +1 -1
  52. package/dist-types/cruise-canvas/ToolCallStatus/ToolCallStatus.d.ts +1 -1
  53. package/dist-types/cruise-canvas/ToolProgressLine/ToolProgressLine.d.ts +1 -1
  54. package/dist-types/cruise-canvas/getFlatOrderedJobs.d.ts +3 -2
  55. package/dist-types/cruise-canvas/i18n.d.ts +0 -11
  56. package/dist-types/cruise-canvas/index.d.ts +0 -7
  57. package/dist-types/cruise-canvas/interfaces.d.ts +1 -99
  58. package/dist-types/cruise-canvas/reducers/errors.d.ts +4 -0
  59. package/dist-types/cruise-canvas/reducers/interfaces.d.ts +2 -2
  60. package/dist-types/cruise-canvas/useConversationDetail.d.ts +1 -1
  61. package/dist-types/cruise-canvas/useConversationGraph.d.ts +2 -2
  62. package/dist-types/cruise-canvas/useLayout.d.ts +1 -2
  63. package/dist-types/cruise-canvas/utils/getToolDataProgress.d.ts +1 -1
  64. package/dist-types/elevo-sidebar/ChatHistory.d.ts +2 -2
  65. package/dist-types/elevo-sidebar/index.d.ts +0 -4
  66. package/dist-types/shared/ChatBox/ChatBox.d.ts +1 -2
  67. package/dist-types/shared/CreatedView/CreatedView.d.ts +1 -1
  68. package/dist-types/shared/TaskContext.d.ts +2 -2
  69. package/dist-types/shared/constants.d.ts +3 -4
  70. package/dist-types/shared/interfaces.d.ts +4 -0
  71. package/package.json +2 -3
  72. package/dist/chunks/3689.2a3f6d8c.js +0 -3
  73. package/dist/chunks/3689.2a3f6d8c.js.map +0 -1
  74. package/dist/chunks/6754.7bcec0be.js +0 -2
  75. package/dist/chunks/6754.7bcec0be.js.map +0 -1
  76. package/dist/chunks/7493.76f316f5.js +0 -2
  77. package/dist/chunks/7493.76f316f5.js.map +0 -1
  78. package/dist/chunks/7520.3cec74b9.js +0 -2
  79. package/dist/chunks/7520.3cec74b9.js.map +0 -1
  80. package/dist/chunks/9535.ff0f82a1.js +0 -3
  81. package/dist/chunks/9535.ff0f82a1.js.map +0 -1
  82. package/dist/chunks/9828.6afc1a0f.js.LICENSE.txt +0 -1
  83. package/dist/chunks/9828.6afc1a0f.js.map +0 -1
  84. package/dist/chunks/9965.6e6bda17.js +0 -2
  85. package/dist/chunks/9965.6e6bda17.js.map +0 -1
  86. package/dist/chunks/chat-box.864bf43b.js +0 -2
  87. package/dist/chunks/chat-box.864bf43b.js.map +0 -1
  88. package/dist/chunks/chat-input.679aec70.js +0 -3
  89. package/dist/chunks/chat-input.679aec70.js.map +0 -1
  90. package/dist/chunks/chat-stream.9c05bfdd.js +0 -2
  91. package/dist/chunks/chat-stream.9c05bfdd.js.map +0 -1
  92. package/dist/chunks/cruise-canvas.259aabf0.js +0 -2
  93. package/dist/chunks/cruise-canvas.259aabf0.js.map +0 -1
  94. package/dist/chunks/elevo-sidebar.08b20757.js +0 -3
  95. package/dist/chunks/elevo-sidebar.08b20757.js.LICENSE.txt +0 -5
  96. package/dist/chunks/elevo-sidebar.08b20757.js.map +0 -1
  97. package/dist/chunks/main.68f962c7.js +0 -2
  98. package/dist/chunks/main.68f962c7.js.map +0 -1
  99. package/dist/chunks/show-case.2e705d81.js +0 -2
  100. package/dist/chunks/show-case.2e705d81.js.map +0 -1
  101. package/dist/index.7be70cad.js +0 -2
  102. package/dist/index.7be70cad.js.map +0 -1
  103. package/dist-types/chat-stream/HumanAdjustPlanResult/HumanAdjustPlanResult.d.ts +0 -5
  104. package/dist-types/chat-stream/LegacyChatStream.d.ts +0 -13
  105. package/dist-types/chat-stream/useTaskStream.d.ts +0 -6
  106. package/dist-types/cruise-canvas/AlertEvents/AlertEvents.d.ts +0 -13
  107. package/dist-types/cruise-canvas/DeploymentChanges/DeploymentChanges.d.ts +0 -12
  108. package/dist-types/cruise-canvas/HumanAdjustPlanResult/HumanAdjustPlanResult.d.ts +0 -5
  109. package/dist-types/cruise-canvas/HumanConfirm/HumanConfirm.d.ts +0 -5
  110. package/dist-types/cruise-canvas/LegacyCruiseCanvas.d.ts +0 -20
  111. package/dist-types/cruise-canvas/PlanProgress/PlanProgress.d.ts +0 -7
  112. package/dist-types/cruise-canvas/ReplayToolbar/ReplayToolbar.d.ts +0 -7
  113. package/dist-types/cruise-canvas/Topology/Topology.d.ts +0 -7
  114. package/dist-types/cruise-canvas/TraceList/TraceList.d.ts +0 -13
  115. package/dist-types/cruise-canvas/cmdb.d.ts +0 -14
  116. package/dist-types/cruise-canvas/diagram.d.ts +0 -3
  117. package/dist-types/cruise-canvas/legacy-reducers/error.d.ts +0 -3
  118. package/dist-types/cruise-canvas/legacy-reducers/error.spec.d.ts +0 -1
  119. package/dist-types/cruise-canvas/legacy-reducers/index.d.ts +0 -3
  120. package/dist-types/cruise-canvas/legacy-reducers/interfaces.d.ts +0 -15
  121. package/dist-types/cruise-canvas/legacy-reducers/jobs.d.ts +0 -4
  122. package/dist-types/cruise-canvas/legacy-reducers/jobs.spec.d.ts +0 -1
  123. package/dist-types/cruise-canvas/legacy-reducers/task.d.ts +0 -4
  124. package/dist-types/cruise-canvas/legacy-reducers/task.spec.d.ts +0 -1
  125. package/dist-types/cruise-canvas/reducers/error.d.ts +0 -3
  126. package/dist-types/cruise-canvas/reducers/error.spec.d.ts +0 -1
  127. package/dist-types/cruise-canvas/useTaskDetail.d.ts +0 -9
  128. package/dist-types/cruise-canvas/useTaskGraph.d.ts +0 -11
  129. package/dist-types/elevo-sidebar/LegacyChatHistory.d.ts +0 -24
  130. package/dist-types/shared/HumanAdjustPlan/HumanAdjustPlan.d.ts +0 -5
  131. package/dist-types/shared/HumanAdjustPlan/i18n.d.ts +0 -17
  132. package/dist-types/shared/ReplayToolbar/ReplayToolbar.d.ts +0 -7
  133. package/dist-types/shared/ReplayToolbar/i18n.d.ts +0 -18
  134. package/docs/cruise-canvas.md +0 -366
  135. /package/dist/chunks/{9535.ff0f82a1.js.LICENSE.txt → 103.8b767f50.js.LICENSE.txt} +0 -0
  136. /package/dist/chunks/{chat-input.679aec70.js.LICENSE.txt → chat-input.2bf76ff7.js.LICENSE.txt} +0 -0
@@ -1,366 +0,0 @@
1
- 构件 `ai-portal.cruise-canvas`
2
-
3
- ## Examples
4
-
5
- ### Basic
6
-
7
- ```yaml preview minHeight="600px"
8
- brick: div
9
- properties:
10
- style:
11
- width: 100vw
12
- height: 100vh
13
- position: fixed
14
- top: 0
15
- left: 0
16
- children:
17
- - brick: ai-portal.cruise-canvas
18
- properties:
19
- task:
20
- state: completed
21
- requirement: |-
22
- 帮我在CMDB中完成手机银行系统的资源纳管
23
- plan:
24
- - id: "2"
25
- state: completed
26
- instruction: |-
27
- 深度搜素内部知识库,确认手机银行系统包含的逻辑组件和部署要求
28
- - id: "8"
29
- state: completed
30
- instruction: |-
31
- 深度搜素CMDB给出资源的纳管现状
32
- - id: "10"
33
- state: completed
34
- instruction: |-
35
- 利用深度思考能力,给出手机银行系统的资源纳管优化方案,该方案用户可以微调或确认
36
- - id: "12"
37
- state: completed
38
- instruction: |-
39
- 在CMDB中完成手机银行系统的资源纳管
40
- - id: "14"
41
- state: completed
42
- instruction: |-
43
- 生成纳管后手机银行系统的逻辑架构和部署架构图
44
- jobs:
45
- - id: "2"
46
- state: completed
47
- instruction: |-
48
- 深度搜素内部知识库,确认手机银行系统包含的逻辑组件和部署要求
49
- - id: "4"
50
- upstream: ["2"]
51
- toolCall:
52
- name: online_search
53
- originalArguments: |-
54
- {"keywords":"手机银行系统"}
55
- state: completed
56
- messages:
57
- - role: tool
58
- parts:
59
- - type: text
60
- text: |-
61
- {"content":"手机银行系统的逻辑组件包含用户认证,交易接入和理财中心三个模块组成。"}
62
- - role: assistant
63
- parts:
64
- - type: text
65
- text: |-
66
- 《手机银行系统》
67
-
68
- 依据内部知识库,手机银行系统的逻辑组件包含用户认证,交易接入和理财中心三个模块组成。
69
- - id: "5"
70
- upstream: ["2"]
71
- state: completed
72
- toolCall:
73
- name: online_search
74
- originalArguments: |-
75
- {"keywords":"XX公司运维管理文件"}
76
- messages:
77
- - role: assistant
78
- parts:
79
- - type: text
80
- text: |-
81
- 《XX公司运维管理文件》
82
-
83
- 依据《XX公司运维管理文件》该系统的重要等级为一级,可用性要求99.999%,MTTR为小于3分钟,该系统部署需要实现异地容灾,建议采用双中心部署,且单中心内核心模块无单点。
84
- - role: tool
85
- parts:
86
- - type: data
87
- data:
88
- type: cmdb_instance_detail
89
- objectId: HOST
90
- detail:
91
- hostname: dev-01
92
- env:
93
- - id: prod
94
- name: 生产
95
- - id: test
96
- name: 测试
97
- backupOwners:
98
- - username: Jerry
99
- email: jerry@example.com
100
- - username: Lucy
101
- email: lucy@example.com
102
- - username: Mark
103
- email: mark@example.com
104
- owner:
105
- username: Jim
106
- email: jim@example.com
107
- - id: dev
108
- name: 开发
109
- owner:
110
- username: Tom
111
- email: tom@example.com
112
- system:
113
- id: web
114
- name: Web
115
- outputSchema:
116
- type: object
117
- properties:
118
- hostname:
119
- description: 主机名
120
- type: string
121
- system:
122
- type: object
123
- properties:
124
- id:
125
- type: string
126
- description: ID
127
- name:
128
- type: string
129
- env:
130
- type: array
131
- description: 环境
132
- items:
133
- type: object
134
- properties:
135
- id:
136
- description: ID
137
- type: string
138
- name:
139
- description: 环境名称
140
- type: string
141
- owner:
142
- type: object
143
- properties:
144
- username:
145
- type: string
146
- description: 用户名
147
- email:
148
- type: string
149
- description: 邮箱
150
- backupOwners:
151
- type: array
152
- items:
153
- type: object
154
- properties:
155
- username:
156
- type: string
157
- description: 用户名
158
- email:
159
- type: string
160
- description: 邮箱
161
- - id: "7"
162
- upstream: ["4", "5"]
163
- state: completed
164
- messages:
165
- - role: assistant
166
- parts:
167
- - type: text
168
- text: |-
169
- 依据内部知识库,手机银行系统的逻辑组件包含用户认证,交易接入和理财中心三个模块组成。依据《XX公司运维管理文件》该系统的重要等级为一级,可用性要求99.999%,MTTR为小于3分钟,该系统部署需要实现异地容灾,建议采用双中心部署,且单中心内核心模块无单点。
170
- - id: "8"
171
- upstream: ["7"]
172
- instruction: |-
173
- 深度搜素CMDB给出资源的纳管现状
174
- state: completed
175
- toolCall:
176
- name: create_view
177
- originalArguments: |-
178
- {"requirement":"创建一个 XX 视图"}
179
- messages:
180
- - role: tool
181
- parts:
182
- - type: text
183
- text: |-
184
- <%
185
- JSON.stringify({
186
- "viewId": "view-123",
187
- "code": `// 调用监控数据查询接口查询该主机该时间段内的 CPU 使用率、磁盘使用率和网络流量的指标数据
188
- defineDataSource("hostMetrics", {
189
- api: "easyops.api.data_exchange.olap@Query",
190
- objectId: "HOST",
191
- params: {
192
- model: "easyops.HOST",
193
- filters: [
194
- {
195
- name: "ip",
196
- operator: "==",
197
- value: "1.2.3.4"
198
- },
199
- {
200
- name: "time",
201
- operator: ">=",
202
- value: "now-2d"
203
- },
204
- {
205
- name: "time",
206
- operator: "<=",
207
- value: "now-1s"
208
- }
209
- ],
210
- dims: ["time(auto)"],
211
- measures: [
212
- {
213
- function: {
214
- args: ["system_cpu_total_norm_pct"],
215
- expression: "avg"
216
- },
217
- name: "system_cpu_total_norm_pct"
218
- },
219
- {
220
- function: {
221
- args: ["system_filesystem_usage_pct"],
222
- expression: "avg"
223
- },
224
- name: "system_filesystem_usage_pct"
225
- },
226
- {
227
- function: {
228
- args: ["system_network_in_bits_per_sec"],
229
- expression: "avg"
230
- },
231
- name: "system_network_in_bits_per_sec"
232
- },
233
- {
234
- function: {
235
- args: ["system_network_out_bits_per_sec"],
236
- expression: "avg"
237
- },
238
- name: "system_network_out_bits_per_sec"
239
- }
240
- ]
241
- }
242
- });
243
-
244
- export default (
245
- <eo-view title="主机 1.2.3.4 监控趋势">
246
- <eo-dashboard
247
- dataSource={CTX.hostMetrics}
248
- widgets={[
249
- {
250
- widget: "chart",
251
- type: "line",
252
- title: "CPU 使用率",
253
- metric: {
254
- id: "system_cpu_total_norm_pct",
255
- unit: "percent(1)"
256
- }
257
- },
258
- {
259
- widget: "chart",
260
- type: "area",
261
- title: "磁盘使用率",
262
- metric: {
263
- id: "system_filesystem_usage_pct",
264
- unit: "percent(1)"
265
- }
266
- },
267
- {
268
- widget: "chart",
269
- type: "line",
270
- title: "网络流量 (入)",
271
- metric: {
272
- id: "system_network_in_bits_per_sec",
273
- unit: "bits/sec"
274
- }
275
- },
276
- {
277
- widget: "chart",
278
- type: "line",
279
- title: "网络流量 (出)",
280
- metric: {
281
- id: "system_network_out_bits_per_sec",
282
- unit: "bits/sec"
283
- }
284
- }
285
- ]}
286
- />
287
- </eo-view>
288
- );`
289
- })
290
- %>
291
- - role: assistant
292
- parts:
293
- - type: text
294
- text: |-
295
- 基于CMDB查询手机银行的资源纳管情况,纳管现状总结如下:
296
-
297
- 实例数据的完整性
298
- 1. 系统录入(已完成)
299
- 2. 模块录入(部分完成),交易接入模块未录入
300
- 3. 环境录入(已完成)
301
- 4. 主机录入(部分完成),交易接入模块主机未录入
302
- 5. 部署实例录入(部分完成),交易接入模块的部署实例未录入
303
-
304
- 关系数据的完整性
305
- 1. 系统和模块(部分完成),系统和交易接入模块的关系未建立
306
- 2. 系统和环境(√)
307
- 3. 模块和主机(部分完成)
308
- 4. ...
309
- - id: "10"
310
- upstream: ["8"]
311
- toolCall:
312
- name: ask_human
313
- arguments:
314
- command: ask_user_more
315
- question: |-
316
- - 交易接入模块的录入;
317
- - 系统和交易接入模块的关系创建 ;
318
- - 部署实例自动采集特征录入。
319
- instruction: |-
320
- 利用深度思考能力,给出手机银行系统的资源纳管优化方案,该方案用户可以微调或确认
321
- state: completed
322
- messages:
323
- - role: user
324
- parts:
325
- - type: text
326
- text: |-
327
- 我补充下...
328
- - id: "12"
329
- upstream: ["10"]
330
- instruction: |-
331
- 在CMDB中完成手机银行系统的资源纳管
332
- toolCall:
333
- name: ask_human
334
- arguments:
335
- command: ask_user_confirm
336
- question: |-
337
- 方案执行的过程信息
338
- state: completed
339
- messages:
340
- - role: tool
341
- parts:
342
- - type: text
343
- text: |-
344
- 确认
345
- - id: "14"
346
- upstream: ["12"]
347
- instruction: |-
348
- 生成纳管后手机银行系统的逻辑架构和部署架构图
349
- tag: topology
350
- state: completed
351
- messages:
352
- - role: assistant
353
- parts:
354
- - type: text
355
- text: |-
356
- https://example.com/topology
357
- - id: "16"
358
- upstream: ["14"]
359
- state: completed
360
- messages:
361
- - role: assistant
362
- parts:
363
- - type: text
364
- text: |-
365
- 该手机银行系统的资源纳管已经完成,本次纳管新增了交易接入模块和该模块相关的主机,以及部署实例信息,模块的纳管建议和架构管理平台打通,部署实例的纳管建议和自动发布平台打通,以便自动完成数据变更,确保数据的准确性,降低架构维护成本。
366
- ```