@openbkn/workshop 0.2.2-rc.5 → 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.
- package/README.md +83 -13
- package/component.d.ts +10 -0
- package/dist/ActionConfirm-DJ91X3ml.js +236 -0
- package/dist/ActionFailure-ZgPt_3B-.js +37 -0
- package/dist/AgentChat-CRYai8ge.js +1062 -0
- package/dist/AppFormModal-D73ucaHK.js +4282 -0
- package/dist/AppListPage-D87piiOw.js +1364 -0
- package/dist/AskDrawer-BUMYsRnt.js +38 -0
- package/dist/ComputedView-CgYrDbx1.js +3221 -0
- package/dist/ConclusionApply-sjGfoEBY.js +153 -0
- package/dist/CypherEditor-lus6FA5L.js +485 -0
- package/dist/LandingList-6JI6864C.js +230 -0
- package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
- package/dist/ModelTrial-ClHFGTpQ.js +359 -0
- package/dist/PageRenderer-DBd_g6mN.js +85480 -0
- package/dist/README-DjRyTQSR.js +76 -0
- package/dist/ScenarioApply-DtW_hh47.js +590 -0
- package/dist/SimulateForm-C-i08Jjd.js +153 -0
- package/dist/Subgraph-CnrkH9AN.js +32586 -0
- package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
- package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
- package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
- package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
- package/dist/actionButton-DA5CNEzx.js +94 -0
- package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
- package/dist/agentChat-EoDznd58.js +116 -0
- package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
- package/dist/alertList-DqditwM8.js +84 -0
- package/dist/alertList.en-US-BAXAgltP.js +84 -0
- package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
- package/dist/asOfSlider-QPvHWUMV.js +83 -0
- package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
- package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
- package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
- package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
- package/dist/channel-B034hcOF.js +5 -0
- package/dist/china-C6m7zXIv.js +9 -0
- package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
- package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
- package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
- package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
- package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
- package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
- package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
- package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
- package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
- package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
- package/dist/component.d-DFoMKuUv.js +179 -0
- package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
- package/dist/customComponents-DasaZ6pq.js +4 -0
- package/dist/customComponents.en-US-CkabuCXg.js +79 -0
- package/dist/customParseFormat-C0uLEpdq.js +182 -0
- package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
- package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
- package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
- package/dist/d3-scale-DA8IHmf0.js +1841 -0
- package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
- package/dist/dateRange-BbkLMg8L.js +79 -0
- package/dist/dateRange.en-US-CV12Q02G.js +79 -0
- package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
- package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
- package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
- package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
- package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
- package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
- package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
- package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
- package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
- package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
- package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
- package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
- package/dist/eventList-CnsAwfDS.js +115 -0
- package/dist/eventList.en-US-Cof3rCLq.js +115 -0
- package/dist/eventReport-XS-HegnH.js +76 -0
- package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
- package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
- package/dist/ganttChart-DEeSvTJA.js +77 -0
- package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
- package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
- package/dist/generateCypher-Ch9_lQa6.js +399 -0
- package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
- package/dist/graph-CKJmgLki.js +1541 -0
- package/dist/index-BA-GzCXt.js +441 -0
- package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
- package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
- package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
- package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
- package/dist/katex-BsrBVQKd.js +11314 -0
- package/dist/manifest-BjV1PJ6u.js +41 -0
- package/dist/mermaid.core-yQghUlIz.js +17642 -0
- package/dist/metricCards-CSb-_cT2.js +104 -0
- package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
- package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
- package/dist/modelTrial-Bvb-RhGt.js +137 -0
- package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
- package/dist/models-DekiCOuZ.js +6 -0
- package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
- package/dist/object-metric.service-flZgBMRX.js +233 -0
- package/dist/objectDetail-SQUbp4Py.js +117 -0
- package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
- package/dist/objectList-D99wPtJH.js +97 -0
- package/dist/objectList.en-US-PBBNyVLW.js +97 -0
- package/dist/objectTable-0jsFFMN3.js +127 -0
- package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
- package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
- package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
- package/dist/pivotTable-CHmQw18-.js +102 -0
- package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
- package/dist/prompt-DYrjlEFr.js +373 -0
- package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
- package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
- package/dist/regionMap-Cme-JyV_.js +128 -0
- package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
- package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
- package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
- package/dist/scenarioBar-BV43p7n-.js +122 -0
- package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
- package/dist/scheduleGantt-CTYO-zYP.js +180 -0
- package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
- package/dist/searchBox-Ca7w0f_6.js +67 -0
- package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
- package/dist/segmentedFilter-MhjVcWo0.js +80 -0
- package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
- package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
- package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
- package/dist/stageChain-BxBafwjD.js +74 -0
- package/dist/stageChain.en-US-CP0G27n8.js +74 -0
- package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
- package/dist/subgraph-7n4SwliR.js +71 -0
- package/dist/subgraph.en-US-BNvY18IW.js +71 -0
- package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
- package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
- package/dist/taskInbox-DGWYeI2b.js +118 -0
- package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
- package/dist/text-BqSVQKS6.js +78 -0
- package/dist/text.en-US-BhAxy_LE.js +78 -0
- package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
- package/dist/trendChart-BjEeRS5_.js +135 -0
- package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
- package/dist/useLabData-Df-jEHKs.js +20470 -0
- package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
- package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
- package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
- package/dist/workshop-app-DnHNjBqy.js +86038 -0
- package/dist/workshop-app.css +1 -0
- package/dist/workshop-app.js +4 -0
- package/dist/world-Djau1JyJ.js +9 -0
- package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
- package/dist-cli/workshop.js +341 -218
- package/example/host.js +109 -0
- package/example/index.html +93 -0
- package/example/server.mjs +237 -0
- package/index.d.ts +48 -0
- package/lib/validate.js +47 -1
- package/package.json +17 -5
- package/runtime/frame-runtime.js +13 -1
- package/workshop-component.js +32 -12
- package/workshop.js +2 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { c as e, s as r } from "./flowDiagram-IUGLLWBU-BGIBH0q0.js";
|
|
2
|
+
import { _ as a } from "./mermaid.core-yQghUlIz.js";
|
|
3
|
+
import "./dayjs.min-DZ-YV8Mv.js";
|
|
4
|
+
var s = /* @__PURE__ */ a((t) => `${r(t)}
|
|
5
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
6
|
+
stroke: ${t.clusterBorder} !important;
|
|
7
|
+
}
|
|
8
|
+
[data-look="neo"].cluster rect {
|
|
9
|
+
filter: none;
|
|
10
|
+
}
|
|
11
|
+
`, "getStyles"), l = s, i = e({ styles: l });
|
|
12
|
+
export {
|
|
13
|
+
i as diagram
|
|
14
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const n = `# 任务收件箱(taskInbox)
|
|
2
|
+
|
|
3
|
+
列出由事件归并成的任务,打开一个任务查看事件、分析与处理,选处理方案并记录决定,必要时直接执行方案绑定的行动。用来做“这批事件怎么处理、谁处理、有没有逾期”的决策。
|
|
4
|
+
|
|
5
|
+
## 适用与不适用
|
|
6
|
+
|
|
7
|
+
- 适用:事件很多,需要成批处理并留下依据:同一次检查命中的一批订单、同一客户的多张延期订单、一条登记的异常。
|
|
8
|
+
- 不适用:
|
|
9
|
+
- 只逐条核实、驳回事件,不需要任务:用事件列表(\`eventList\`)。
|
|
10
|
+
- 登记一条新事件:用事件登记(\`eventReport\`)。
|
|
11
|
+
- 对一批对象直接执行行动,不要任务与记录:用按钮(\`actionButton\`)。
|
|
12
|
+
- 看某个对象的详情或关系:用对象详情、关系子图(\`subgraph\`)。
|
|
13
|
+
|
|
14
|
+
## 本体契约
|
|
15
|
+
|
|
16
|
+
| 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
|
|
17
|
+
| --- | --- | --- | --- | --- |
|
|
18
|
+
| 事件类型 | 知识网络里的事件类型及其事件类 | 编码、名称、严重程度(决定任务排序与颜色) | — | 是 |
|
|
19
|
+
| 事件关联的对象 | 事件所说的那类对象 | 名称;按属性归并任务时,用到的那个属性 | 事件 → 对象 | 否:没有时显示事件标题 |
|
|
20
|
+
| 对象的数据源 | 应用里这类对象的全量数据源 | 页面已读取的对象 | — | 否:执行处理方案的行动必须有 |
|
|
21
|
+
| 行动类型 | 处理方案要执行的行动,作用于事件关联的对象类 | 用户填写的参数 | 行动 → 对象类 | 否:方案不绑行动时只记录决定 |
|
|
22
|
+
|
|
23
|
+
任务由 Workshop 按事件类型的归并方式生成,不是组件生成的。归并方式在“事件”页签该类型的“处理方式”里设置:一个事件一个任务、按关联对象的某个属性归并(例如同一客户)、按检查批次归并(规则事件的默认方式;登记事件默认一个事件一个任务)。处理时限、处理方案与方案绑定的行动也在那里设置。
|
|
24
|
+
|
|
25
|
+
## 组件内置的判断
|
|
26
|
+
|
|
27
|
+
| 判断 | 规则 |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| 排序 | 未关闭的任务在前;再按所属事件类型的严重程度 P1 到 P4;再按最近更新由新到旧 |
|
|
30
|
+
| 未处理数 | 任务里没有结果的事件个数 |
|
|
31
|
+
| 剩余时限 | 未关闭且仍有未处理事件的任务,按事件类型设置的处理时限显示“已超时”,或剩余小时(不足 48 小时,不足 8 小时时用警示色),或剩余天数 |
|
|
32
|
+
| 事件结果 | 每个事件在任务里是:未处理、处理中、已处理、已恢复、已移出、无需处理 |
|
|
33
|
+
| 任务状态 | 待处理、处理中(显示认领人)、已关闭(原因:均已有结果、已全部恢复、手动结束)、已取消 |
|
|
34
|
+
| 处理不共用事件 | 一个事件同一时间只属于一条有效处理;只能选未处理的事件新建处理 |
|
|
35
|
+
| 回退限制 | 处理的行动已有对象执行成功或已受理后,不能回退 |
|
|
36
|
+
|
|
37
|
+
## 扩展点
|
|
38
|
+
|
|
39
|
+
### 处理方案与方案绑定的行动
|
|
40
|
+
|
|
41
|
+
- **用途**:把“怎么处理”变成可选的方案,并让方案真正去改业务数据,例如“催交供应商”执行“发送催交”行动。
|
|
42
|
+
- **在哪里配**:“事件”页签该事件类型的“处理方式”:处理方案(最多 12 个,每个不超过 40 字),以及每个方案执行的行动(可选“仅记录,不执行行动”)。方案名不是 AI 编造的,要由用户确认。
|
|
43
|
+
- **接什么**:知识网络里作用于事件关联对象类的行动类型。
|
|
44
|
+
- **输入**:提交处理时,对被处理事件所关联的对象(一次最多 100 个)打开平台的执行确认,用户在确认里填写参数、检查权限、确认后逐个对象以用户身份执行。参数的取值来源按行动配置。
|
|
45
|
+
- **输出**:每个对象的执行结果,记在这条处理上。
|
|
46
|
+
- **失败与超时**:页面数据里找不到这些事件对应的对象时,提示并且不执行;确认被关闭而没有执行时,处理上显示“行动尚未执行”,可点“前往执行”再打开;部分对象失败时,显示“n 个已生效,n 个失败,n 个处理中”,悬停看各对象的结果。
|
|
47
|
+
- **结果怎样显示**:处理列表里每条处理显示方案名、针对几个事件、依据的分析、提交人与时间、理由、行动结果。
|
|
48
|
+
|
|
49
|
+
### 分析视图
|
|
50
|
+
|
|
51
|
+
与事件列表(\`eventList\`)相同:配了分析视图的事件类型,任务事件页签里每个事件有“分析”按钮,打开所配页面并关闭任务面板。
|
|
52
|
+
|
|
53
|
+
## 交互与联动
|
|
54
|
+
|
|
55
|
+
- **写入**:不写页面筛选;点“分析”时按该事件类型的分析视图写入筛选并切页面。
|
|
56
|
+
- **读取**:不跟随页面筛选;显示什么只由“任务所属事件类型”和右上角“未关闭 / 全部”决定。
|
|
57
|
+
- **任务面板**:点一行打开右侧面板,三个页签:
|
|
58
|
+
- 事件:显示每个事件的对象、时间、结果、所属处理;可勾选未处理的事件,再点“新建处理”。
|
|
59
|
+
- 分析:只读,列出已记录的分析(结论、记录人、来源:备注、分析页面、问数、图探索、外部 Agent、针对哪些事件、时间)。
|
|
60
|
+
- 处理:列出已记录的处理,可“回退”(要写原因,处理记为“已回退”,事件回到未处理);Agent 起草的处理显示为“草稿”;下方表单选择处理方案(可选也可直接输入)、针对的事件、依据的分析、理由,点“提交处理”。方案必选、至少选一个事件。
|
|
61
|
+
- 本组件的面板里没有认领、添加分析、判定无需处理、移出和结束任务的按钮;这些状态由平台与 Workshop 记录,组件只显示。
|
|
62
|
+
- **刷新**:每 30 秒读取一次;同一应用在其他标签页里的改动会同步。
|
|
63
|
+
|
|
64
|
+
## 场景配方
|
|
65
|
+
|
|
66
|
+
### 订单延期的催办
|
|
67
|
+
|
|
68
|
+
| 角色 | 对应 |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| 事件类型 | “订单交付风险”,规则命中 |
|
|
71
|
+
| 事件关联的对象 | 销售订单 |
|
|
72
|
+
| 归并方式 | 按关联对象的属性归并:客户 |
|
|
73
|
+
| 处理方案 | 催交供应商(绑定“发送催交”行动)、与客户协商交期(仅记录)、调整排产(仅记录) |
|
|
74
|
+
| 处理时限 | 24 小时 |
|
|
75
|
+
|
|
76
|
+
**知识网络中要有:**
|
|
77
|
+
|
|
78
|
+
- 订单交付风险事件类与规则工具;订单对象类,含“客户”属性。
|
|
79
|
+
- 行动类型“发送催交”,作用于订单。
|
|
80
|
+
- 规则工具返回客户这一列,用于按属性归并。
|
|
81
|
+
|
|
82
|
+
**检查项:** 同一客户的延期订单进入同一个任务;勾选几个事件,选“催交供应商”,提交后弹出执行确认;确认后处理上显示行动执行结果;超过 24 小时仍有未处理事件的任务显示“已超时”。
|
|
83
|
+
|
|
84
|
+
### 现场异常的处置记录
|
|
85
|
+
|
|
86
|
+
| 角色 | 对应 |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| 事件类型 | “设备异常”,用户登记 |
|
|
89
|
+
| 归并方式 | 一个事件一个任务 |
|
|
90
|
+
| 处理方案 | 停机检修、降速运行、观察(均仅记录) |
|
|
91
|
+
|
|
92
|
+
**知识网络中要有:** 设备异常事件类(用户登记)、设备对象类。
|
|
93
|
+
|
|
94
|
+
**检查项:** 登记并核实一条设备异常后,收件箱出现一个任务;提交处理后事件结果变为“已处理”,并记下理由。
|
|
95
|
+
|
|
96
|
+
## 给 AI 的指引
|
|
97
|
+
|
|
98
|
+
1. 先问用户:处理哪几类事件,任务怎样归并(逐个、按客户这类属性、按检查批次),每类事件有哪些处理方案,哪些方案要执行行动,处理时限多长。
|
|
99
|
+
2. 处理方案必须由用户给出,不要自行编造;方案要绑行动时,确认知识网络里有作用于该对象类的行动。
|
|
100
|
+
3. 要执行行动,应用里必须有事件关联对象类的数据源,页面上要已读到这些对象,否则会提示“页面数据中未找到这些事件对应的对象”。
|
|
101
|
+
4. 归并方式、处理时限、方案都在“事件”页签配置,不在组件上;组件上只选事件类型、默认显示、最多显示条数。
|
|
102
|
+
5. 常见错误:
|
|
103
|
+
- 以为任务由组件生成。任务由 Workshop 按归并方式生成,组件只展示与记录处理。
|
|
104
|
+
- 把事件类型选成登记类却想按检查批次归并。登记事件默认一个事件一个任务。
|
|
105
|
+
- 方案绑定的行动与事件关联的对象类不一致。
|
|
106
|
+
- 期待在这个组件里认领、结束任务或添加分析:本组件没有这些操作。
|
|
107
|
+
|
|
108
|
+
## 限制
|
|
109
|
+
|
|
110
|
+
- 最多显示条数 5 到 100,默认 20。
|
|
111
|
+
- 一条处理执行行动时,一次最多对 100 个对象执行。
|
|
112
|
+
- 每个事件类型最多 12 个处理方案,每个方案名不超过 40 字。
|
|
113
|
+
- 处理的行动已有对象成功执行或受理后,不能回退。
|
|
114
|
+
- 没有事件类型时,组件提示先到“事件”页签选择。
|
|
115
|
+
`;
|
|
116
|
+
export {
|
|
117
|
+
n as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const e = `# Task inbox (taskInbox)
|
|
2
|
+
|
|
3
|
+
Lists the tasks that events were gathered into. Open one to see its events, analyses and handlings, pick a handling choice and record the decision, and run the action bound to that choice when there is one. Use it to decide how a batch of events is handled, by whom, and whether anything is overdue.
|
|
4
|
+
|
|
5
|
+
## When to use it and when not
|
|
6
|
+
|
|
7
|
+
- Use it when there are many events to handle in batches and leave the grounds behind: a batch of orders hit by one check, several late orders of one customer, one reported anomaly.
|
|
8
|
+
- Do not use it:
|
|
9
|
+
- To only verify or reject events one by one without tasks: use the event list (\`eventList\`).
|
|
10
|
+
- To report a new event: use the event report (\`eventReport\`).
|
|
11
|
+
- To run an action on a batch of objects without tasks and records: use the button (\`actionButton\`).
|
|
12
|
+
- To look at one object's details or relations: use object details or the related graph (\`subgraph\`).
|
|
13
|
+
|
|
14
|
+
## Ontology contract
|
|
15
|
+
|
|
16
|
+
| Role | Object type | Required properties | Relations | Required |
|
|
17
|
+
| --- | --- | --- | --- | --- |
|
|
18
|
+
| Event type | An event type of the network with its event class | Code, name, severity (decides task order and colour) | None | Yes |
|
|
19
|
+
| Object the event is about | The kind of object an event speaks of | Name; when tasks are grouped by a property, that property | Event to object | No: without it the event title shows |
|
|
20
|
+
| Source of those objects | The app's source with all objects of that type | Objects the page has read | None | No: required to run a handling's action |
|
|
21
|
+
| Action type | The action a handling choice runs, acting on the object type the event is about | The inputs a user fills in | Action to object type | No: a choice without an action only records the decision |
|
|
22
|
+
|
|
23
|
+
Tasks are made by Workshop from the event type's grouping, not by the component. Grouping is set on the "Events" tab under "Handling" of that type: one task per event, one per value of a property of the related object (for example the same customer), or one per rule check (the default for rule events; reported events default to one task per event). The time limit, the handling choices and the actions bound to them are set there too.
|
|
24
|
+
|
|
25
|
+
## Built-in checks
|
|
26
|
+
|
|
27
|
+
| Check | Rule |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Order | Open tasks first; then the severity of the event type, P1 to P4; then latest update first |
|
|
30
|
+
| Unhandled count | Number of events in the task with no outcome yet |
|
|
31
|
+
| Time left | For an open task with unhandled events, based on the time limit of its event type: "Overdue", or hours left (under 48 hours, with a warning colour under 8 hours), or days left |
|
|
32
|
+
| Event outcome | Each event in a task is: unhandled, in progress, handled, recovered, moved out, or not needed |
|
|
33
|
+
| Task status | To do, in progress (with who took it), closed (because all settled, all recovered, or ended by hand), or cancelled |
|
|
34
|
+
| Handlings do not share events | An event belongs to one standing handling at a time. Only unhandled events can be picked for a new handling |
|
|
35
|
+
| Revert limit | Once an action of a handling has run or been accepted on any object, the handling cannot be reverted |
|
|
36
|
+
|
|
37
|
+
## Extension points
|
|
38
|
+
|
|
39
|
+
### Handling choices and the actions bound to them
|
|
40
|
+
|
|
41
|
+
- **Purpose**: turn "how to handle it" into selectable choices, and let a choice change business data, for example "chase the supplier" running the "send chase" action.
|
|
42
|
+
- **Where to set it**: on the "Events" tab under "Handling" of the event type: the choices (up to 12, each at most 40 characters) and the action each runs, or "record only, run no action". The choices are not for the AI to invent. The user confirms them.
|
|
43
|
+
- **What to connect**: an action type of the knowledge network that acts on the object type the events are about.
|
|
44
|
+
- **Input**: when a handling is submitted, the platform's execution confirmation opens for the objects of the handled events (at most 100 at once). The user fills in the inputs, the permission is checked, and after confirming the action runs object by object as that user. Where each input comes from is set with the action.
|
|
45
|
+
- **Output**: the result for each object, kept on the handling.
|
|
46
|
+
- **Failure and timeout**: when the page's data holds none of the objects of those events, the component says so and runs nothing. When the confirmation was closed without running, the handling says the action has not run and offers "Run now" to open it again. When some objects fail, it shows how many took effect, how many failed and how many are in progress, and hovering shows each object's result.
|
|
47
|
+
- **How results show**: each handling in the list shows its choice, how many events it covers, the analyses it rests on, who made it and when, the reason, and the action result.
|
|
48
|
+
|
|
49
|
+
### Analysis view
|
|
50
|
+
|
|
51
|
+
The same as in the event list (\`eventList\`): when the event type has an analysis view, each event on the task's Events tab has an "Analyse" button, which opens the page you set and closes the task panel.
|
|
52
|
+
|
|
53
|
+
## Interaction and links
|
|
54
|
+
|
|
55
|
+
- **Writes**: no page filter, except "Analyse", which writes the filters of the event type's analysis view and switches page.
|
|
56
|
+
- **Reads**: it does not follow the page's filters. What it shows depends only on "Event types of the tasks" and the "Open / All" switch at the top right.
|
|
57
|
+
- **Task panel**: clicking a row opens a side panel with three tabs:
|
|
58
|
+
- Events: each event's object, time, outcome and handling. You can tick unhandled events and press "New handling".
|
|
59
|
+
- Analyses: read only. It lists recorded analyses: conclusion, who recorded it, where it came from (note, analysis page, ask data, graph explorer, external Agent), which events it covers, and when.
|
|
60
|
+
- Handlings: lists recorded handlings. Each can be reverted (a reason is required; the handling is marked reverted and its events go back to unhandled). Handlings drafted by the Agent show as drafts. Below, a form takes the handling choice (pick one or type one), the events covered, the analyses it rests on and the reason, and "Submit handling" records it. A choice and at least one event are required.
|
|
61
|
+
- The component's panel has no buttons to claim a task, add an analysis, mark events as not needed, move events out, or end a task. Those states are recorded by the platform and Workshop and the component only shows them.
|
|
62
|
+
- **Refresh**: read every 30 seconds; changes made in another tab of the same app are picked up.
|
|
63
|
+
|
|
64
|
+
## Recipes
|
|
65
|
+
|
|
66
|
+
### Chasing late orders
|
|
67
|
+
|
|
68
|
+
| Role | Maps to |
|
|
69
|
+
| --- | --- |
|
|
70
|
+
| Event type | "Order delivery risk", rule hit |
|
|
71
|
+
| Object the event is about | Sales order |
|
|
72
|
+
| Grouping | By a property of the related object: customer |
|
|
73
|
+
| Handling choices | Chase the supplier (bound to the "send chase" action), negotiate the date with the customer (record only), change the schedule (record only) |
|
|
74
|
+
| Time limit | 24 hours |
|
|
75
|
+
|
|
76
|
+
**The knowledge network needs:**
|
|
77
|
+
|
|
78
|
+
- The order delivery risk event class with its rule tool, and an order object type with a customer property.
|
|
79
|
+
- An action type "send chase" acting on orders.
|
|
80
|
+
- The rule tool returns the customer column, used to group by property.
|
|
81
|
+
|
|
82
|
+
**Checks:** late orders of one customer land in one task. Tick several events, choose "Chase the supplier" and submit: the execution confirmation opens. After confirming, the handling shows the action result. A task with unhandled events past 24 hours shows "Overdue".
|
|
83
|
+
|
|
84
|
+
### Recording how a floor anomaly was dealt with
|
|
85
|
+
|
|
86
|
+
| Role | Maps to |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| Event type | "Equipment anomaly", reported |
|
|
89
|
+
| Grouping | One task per event |
|
|
90
|
+
| Handling choices | Stop for repair, run at lower speed, keep watching (all record only) |
|
|
91
|
+
|
|
92
|
+
**The knowledge network needs:** an equipment anomaly event class (reported) and an equipment object type.
|
|
93
|
+
|
|
94
|
+
**Checks:** after an equipment anomaly is reported and verified, the inbox shows a task. After submitting a handling the event's outcome is "handled" and the reason is kept.
|
|
95
|
+
|
|
96
|
+
## Guidance for AI
|
|
97
|
+
|
|
98
|
+
1. Ask the user first: which kinds of events are handled, how tasks are grouped (one by one, by a property such as customer, or by check batch), what handling choices each kind has, which choices run an action, and how long the time limit is.
|
|
99
|
+
2. The handling choices must come from the user. Do not invent them. When a choice needs an action, confirm the knowledge network has an action on that object type.
|
|
100
|
+
3. To run an action the app must have a source for the object type the events are about, and the page must have read those objects. Otherwise the component says the page's data holds none of those objects.
|
|
101
|
+
4. Grouping, time limit and choices are set on the "Events" tab, not on the component. The component only sets the event types, the default view and the number of rows.
|
|
102
|
+
5. Common mistakes:
|
|
103
|
+
- Thinking the component makes the tasks. Workshop makes them from the grouping. The component shows them and records handlings.
|
|
104
|
+
- Choosing a reported event type and expecting grouping by check batch. Reported events default to one task per event.
|
|
105
|
+
- Binding an action whose object type differs from the object type the events are about.
|
|
106
|
+
- Expecting to claim or end a task, or add an analysis, in this component. It has none of these actions.
|
|
107
|
+
|
|
108
|
+
## Limits
|
|
109
|
+
|
|
110
|
+
- Maximum rows to show is 5 to 100, default 20.
|
|
111
|
+
- A handling's action runs on at most 100 objects at once.
|
|
112
|
+
- Each event type has at most 12 handling choices, each at most 40 characters.
|
|
113
|
+
- A handling cannot be reverted once its action has run or been accepted on any object.
|
|
114
|
+
- Without event types the component asks you to choose some on the "Events" tab.
|
|
115
|
+
`;
|
|
116
|
+
export {
|
|
117
|
+
e as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const n = `# 文字(text)
|
|
2
|
+
|
|
3
|
+
一段文字,用来写页面开头的结论、分节标题和说明段落。正文里可以引用数字,数字跟着页面的筛选和基准日期变。
|
|
4
|
+
|
|
5
|
+
## 适用与不适用
|
|
6
|
+
|
|
7
|
+
- 适用:页面开头用一句话说清现在怎么样、先干什么;给一组组件写分节标题;写一段操作说明。
|
|
8
|
+
- 不适用:
|
|
9
|
+
- 一排要点击筛选的数字:用指标卡组(\`metricCards\`)。
|
|
10
|
+
- 逐条列出对象:用对象表(\`objectTable\`)或对象列表(\`objectList\`)。
|
|
11
|
+
- 让用户提问:用 Agent 对话(\`agentChat\`)。
|
|
12
|
+
|
|
13
|
+
## 本体契约
|
|
14
|
+
|
|
15
|
+
| 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| 被引用的数字 | 每个数字各自的数据源对应的对象类 | 求和、平均、最大、最小时要一个数字属性 | 无 | 否 |
|
|
18
|
+
|
|
19
|
+
只有文字、不引用数字时,组件不读任何数据。
|
|
20
|
+
|
|
21
|
+
## 组件内置的判断
|
|
22
|
+
|
|
23
|
+
- 内容是 Markdown:标题、加粗、列表、链接。
|
|
24
|
+
- \`{引用名}\` 换成对应的数字,\`{$asOf}\` 换成基准日期;数字还没读到或读不到时显示「—」。
|
|
25
|
+
- 数字的统计写法和指标卡的一项相同:计数、求和、平均、最大最小、去重计数、占比,可只算满足条件的对象,也可以取知识网络的对象指标。
|
|
26
|
+
- 数字没设小数位时,整数不带小数,其他最多两位;占比显示为百分比、一位小数。
|
|
27
|
+
- 每个数字按它自己的「跟随的筛选」过滤,和组件上的其他数字互不影响。
|
|
28
|
+
|
|
29
|
+
## 扩展点
|
|
30
|
+
|
|
31
|
+
无。组件只统计数据源里的对象或读对象指标,不调用工具。
|
|
32
|
+
|
|
33
|
+
## 交互与联动
|
|
34
|
+
|
|
35
|
+
- **写入**:不写入任何筛选。
|
|
36
|
+
- **读取**:每个数字跟随自己勾选的筛选,并按基准日期统计。
|
|
37
|
+
- **谁会跟着变**:组件自己;筛选或基准日期变了,正文里的数字跟着变。
|
|
38
|
+
|
|
39
|
+
## 场景配方
|
|
40
|
+
|
|
41
|
+
### 进销存首页的结论
|
|
42
|
+
|
|
43
|
+
| 角色 | 对应 |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| 被引用的数字 | 采购单(逾期未入库的张数)、销售单(逾期欠货的张数) |
|
|
46
|
+
|
|
47
|
+
**知识网络中要有:** 采购单、销售单,各有带计划日期的进度。
|
|
48
|
+
|
|
49
|
+
\`\`\`yaml
|
|
50
|
+
- id: lead
|
|
51
|
+
type: text
|
|
52
|
+
config:
|
|
53
|
+
content: "截至 {$asOf},**{poLate}** 张采购单逾期未入库,**{soLate}** 张销售单逾期欠货——先催采购,再排销售补货。"
|
|
54
|
+
values:
|
|
55
|
+
- { name: poLate, source: purchaseOrders, aggregate: count, when: [{ field: $status, op: eq, value: overdue }] }
|
|
56
|
+
- { name: soLate, source: salesOrders, aggregate: count, when: [{ field: $status, op: eq, value: overdue }] }
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
**检查项:** 换一个基准日期,两个数字跟着变;清空数据源后显示「—」。
|
|
60
|
+
|
|
61
|
+
## 给 AI 的指引
|
|
62
|
+
|
|
63
|
+
1. 每个页面开头放一个文字组件,一句话说清现在怎么样、先干什么,关键数字用 \`values\` 引用,不要写死在正文里。
|
|
64
|
+
2. 引用名字母开头,只含字母、数字和下划线;正文里写 \`{引用名}\`。
|
|
65
|
+
3. 正文用业务话,不出现字段名、id 和「对象类、关系」这类建模用语。
|
|
66
|
+
4. 常见错误:
|
|
67
|
+
- 正文里的 \`{引用名}\` 在 \`values\` 里没有:显示「—」。
|
|
68
|
+
- 把要点击筛选的数字写进文字:点不了,改用指标卡组。
|
|
69
|
+
- 一段写得太长:首屏只留一两句,细节放到下面的组件或下一页。
|
|
70
|
+
|
|
71
|
+
## 限制
|
|
72
|
+
|
|
73
|
+
- 只统计已读入的数据;对象类数据源最多读 5000 行,Cypher 数据源最多 10000 行(查询没写 LIMIT 时 1000 行)。对象指标由平台按全部对象计算,不受这个限制。
|
|
74
|
+
- 只支持 Markdown 本身的排版,不支持字体颜色、对齐这类设置。
|
|
75
|
+
`;
|
|
76
|
+
export {
|
|
77
|
+
n as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
const e = `# Text (text)
|
|
2
|
+
|
|
3
|
+
A passage of text for a page's opening conclusion, section headings and notes. It can name numbers, which follow the page's filters and base date.
|
|
4
|
+
|
|
5
|
+
## When to use it and when not
|
|
6
|
+
|
|
7
|
+
- Use it to say in one sentence at the top of a page how things stand and what to do first; to head a group of components; to write a note on how to work.
|
|
8
|
+
- Do not use it:
|
|
9
|
+
- For a row of numbers to click and filter by: use the metric cards (\`metricCards\`).
|
|
10
|
+
- To list objects one by one: use the object table (\`objectTable\`) or the object list (\`objectList\`).
|
|
11
|
+
- To let users ask questions: use the Agent chat (\`agentChat\`).
|
|
12
|
+
|
|
13
|
+
## Ontology contract
|
|
14
|
+
|
|
15
|
+
| Role | Object type requirement | Required properties | Relations | Required |
|
|
16
|
+
| --- | --- | --- | --- | --- |
|
|
17
|
+
| Number named | The object type of each number's own data source | A number property for a sum, average, least or greatest | None | No |
|
|
18
|
+
|
|
19
|
+
With text alone and no numbers, the component reads no data.
|
|
20
|
+
|
|
21
|
+
## Built-in checks
|
|
22
|
+
|
|
23
|
+
- The content is Markdown: headings, bold, lists and links.
|
|
24
|
+
- \`{name}\` becomes the number of that name and \`{$asOf}\` the base date; a number not read yet, or not there, reads "—".
|
|
25
|
+
- A number is counted as one metric card is: count, sum, average, least, greatest, distinct count or share, over the objects that meet its conditions, or an object metric of the network.
|
|
26
|
+
- A number with no decimals set shows a whole number as it is and others to two decimals at most; a share shows as a percentage to one decimal.
|
|
27
|
+
- Each number follows its own filters, apart from the other numbers of the component.
|
|
28
|
+
|
|
29
|
+
## Extension points
|
|
30
|
+
|
|
31
|
+
None. The component counts objects of its sources or reads object metrics; it calls no tool.
|
|
32
|
+
|
|
33
|
+
## Interaction and links
|
|
34
|
+
|
|
35
|
+
- **Writes**: no filter.
|
|
36
|
+
- **Reads**: each number follows the filters it picks, and is counted on the base date.
|
|
37
|
+
- **What changes with it**: the component itself; when the filters or the base date change, so do the numbers in the text.
|
|
38
|
+
|
|
39
|
+
## Recipes
|
|
40
|
+
|
|
41
|
+
### The conclusion on an inventory home page
|
|
42
|
+
|
|
43
|
+
| Role | Mapped to |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Number named | Purchase orders (overdue, not received), sales orders (overdue, short shipped) |
|
|
46
|
+
|
|
47
|
+
**The network needs:** purchase orders and sales orders, each with a progress that has planned dates.
|
|
48
|
+
|
|
49
|
+
\`\`\`yaml
|
|
50
|
+
- id: lead
|
|
51
|
+
type: text
|
|
52
|
+
config:
|
|
53
|
+
content: "As of {$asOf}, **{poLate}** purchase orders are overdue and **{soLate}** sales orders are short. Chase the purchases first, then plan the sales refill."
|
|
54
|
+
values:
|
|
55
|
+
- { name: poLate, source: purchaseOrders, aggregate: count, when: [{ field: $status, op: eq, value: overdue }] }
|
|
56
|
+
- { name: soLate, source: salesOrders, aggregate: count, when: [{ field: $status, op: eq, value: overdue }] }
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
**Check:** pick another base date and both numbers change; with an empty source they read "—".
|
|
60
|
+
|
|
61
|
+
## Guidance for AI
|
|
62
|
+
|
|
63
|
+
1. Start each page with a text that says in one sentence how things stand and what to do first. Name the key numbers in \`values\` rather than writing them into the text.
|
|
64
|
+
2. A name starts with a letter and holds only letters, digits and underscores; the text writes \`{name}\`.
|
|
65
|
+
3. Write business words: no field names, ids or modelling words such as object type or relation.
|
|
66
|
+
4. Common mistakes:
|
|
67
|
+
- A \`{name}\` in the text with no entry in \`values\`: it reads "—".
|
|
68
|
+
- Numbers to click and filter by written into text: they cannot be clicked. Use metric cards.
|
|
69
|
+
- A long passage: keep one or two sentences on the first screen, and the details in the components below or on another page.
|
|
70
|
+
|
|
71
|
+
## Limits
|
|
72
|
+
|
|
73
|
+
- Counts only the data read: up to 5000 rows for an object type source, up to 10000 for a Cypher source (1000 when the query has no LIMIT). Object metrics are counted by the platform over every object and are not limited.
|
|
74
|
+
- Only the layout Markdown itself gives: no font colors or alignment.
|
|
75
|
+
`;
|
|
76
|
+
export {
|
|
77
|
+
e as default
|
|
78
|
+
};
|