@xtalpi/agentic-lab-skills 0.0.9 → 0.0.11
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 +1 -1
- package/package.json +14 -14
- package/skills/lab-flow-designer/SKILL.md +612 -593
- package/skills/lab-flow-designer/embedded-template/SKILL.md +103 -88
- package/skills/lab-flow-designer/embedded-template/pools//345/205/245/345/217/243/346/261/240.md +21 -12
- package/skills/lab-flow-designer/embedded-template/pools//345/207/272/345/217/243/346/261/240.md +21 -12
- package/skills/lab-flow-designer/embedded-template/scripts//347/244/272/344/276/213/346/225/260/346/215/256/344/270/216/346/240/241/351/252/214/351/227/250/346/216/247.js +142 -142
- package/skills/lab-flow-designer/embedded-template/valves//347/244/272/344/276/213/346/225/260/346/215/256/344/270/216/346/240/241/351/252/214/351/227/250/346/216/247.md +114 -99
- package/skills/lab-flow-designer/references/agentic-lab-processer.md +122 -78
- package/skills/lab-flow-designer/references/agentic-lab-sdk.md +534 -361
- package/skills/lab-flow-designer/references/rhea-api/README.md +7 -7
- package/skills/lab-flow-designer/references/rhea-api/execute_process_batch.md +58 -58
- package/skills/lab-flow-designer/references/skill-package-layout.md +268 -204
- package/skills/lab-flow-designer/references//344/270/232/345/212/241/346/265/201/347/250/213/346/226/207/346/241/243/346/240/207/345/207/206.md +216 -208
- package/skills/lab-flow-designer/templates//344/270/232/345/212/241/346/265/201/347/250/213/346/226/207/346/241/243/346/250/241/346/235/277.md +192 -169
- package/skills/lab-flow-designer/templates//344/270/232/345/212/241/346/265/201/347/250/213/346/226/207/346/241/243/347/244/272/344/276/213.md +207 -197
- package/skills/lab-flow-designer/testing/test-processer.mjs +1240 -1075
- package/skills/lab-nocobase-flow-generator/SKILL.md +164 -164
- package/skills/lab-nocobase-flow-generator/examples/setting/350/241/250/350/216/267/345/217/226/345/244/226/351/203/250/346/234/215/345/212/241.js +70 -70
- package/skills/lab-nocobase-flow-generator/examples//346/237/245/350/257/242/345/214/226/345/255/246/345/223/201/344/277/241/346/201/257.js +30 -30
- package/skills/lab-nocobase-flow-generator/references/doc-standard.md +84 -84
- package/skills/lab-nocobase-flow-generator/references/runtime-api.md +224 -224
- package/skills/lab-nocobase-flow-generator/templates//350/204/232/346/234/254/351/200/273/350/276/221/346/226/207/346/241/243/346/250/241/346/235/277.md +121 -121
- package/skills/lab-nocobase-flow-generator/templates//350/204/232/346/234/254/351/200/273/350/276/221/346/226/207/346/241/243/347/244/272/344/276/213.md +67 -67
- package/skills/lab-orbit-component-builder/SKILL.md +353 -353
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/.env.local.example +27 -27
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/.eslintignore +7 -7
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/.eslintrc.cjs +88 -88
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/.nvmrc +1 -1
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/AgenticAppAPI.md +268 -268
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/Jenkinsfile +106 -106
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/OrbitAPI.md +453 -453
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/README.md +176 -176
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/public/index.html +12 -12
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/App.vue +151 -151
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/components/DevOpenerLauncher.vue +143 -143
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/global.d.ts +77 -77
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/main.ts +308 -308
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/mockXNBBitable.ts +119 -119
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/shims-vue.d.ts +6 -6
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/dev/src/utils/devOpenerHost.ts +75 -75
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/index.html +13 -13
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/package.json +60 -60
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/api/agenticlabTickets.ts +110 -110
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/entries/bitable.ts +4 -4
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/entries/custom-page.ts +4 -4
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/index.ts +1 -1
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/styles/orbit-quasar-host.scss +19 -19
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/types/context.ts +15 -15
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/types/xnb-context.ts +70 -70
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useBitablePage.ts +189 -189
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useSuperCellDemo.ts +257 -257
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/use/useSuperTableBitableLifecycle.ts +555 -555
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/openerInitParams.ts +158 -158
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/openerTicketIds.ts +32 -32
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/orbitHttpClient.ts +110 -110
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/utils/request.ts +92 -92
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/views/bitable.vue +67 -67
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/src/views/custom-page.vue +140 -140
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/tsconfig.json +45 -45
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/vite.config.ts +170 -170
- package/skills/lab-orbit-component-builder/examples/xnb-component-template/vite.dev.config.ts +58 -58
- package/skills/lab-orbit-component-builder/references/flow-document-human-ui.md +65 -65
- package/skills/lab-orbit-component-builder/references/orbit-vue-conventions.md +133 -133
- package/skills/lab-orbit-component-builder/references/pool-schema-to-columns.md +67 -67
- package/skills/lab-orbit-component-builder/references/vue-template-checklist.md +179 -179
- package/skills/lab-orbit-component-builder/references/xnb-context-vue-props.md +49 -49
- package/skills/lab-orbit-component-builder/references/xnbitable-vue-parity.md +32 -32
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# Rhea HTTP 参考(补充)
|
|
2
|
-
|
|
3
|
-
本目录为 **Rhea 等服务端点** 的 Wire 级说明,供 **SDK 实现与预检对照**;[`../agentic-lab-sdk.md`](../agentic-lab-sdk.md) 中的 **`process.execute`** 由门控传入 **`items`** 与 **`baseURL`**(服务根),**path、HTTP 方法** 仍由 SDK 按本目录文档固定封装。
|
|
4
|
-
|
|
5
|
-
| 文件 | 说明 |
|
|
6
|
-
|------|------|
|
|
7
|
-
| [execute_process_batch.md](execute_process_batch.md) | `execute_process_batch`:URL、请求体 `items` / `process` / `params` / `table_objects`、响应 `exp_id_list` 等 |
|
|
1
|
+
# Rhea HTTP 参考(补充)
|
|
2
|
+
|
|
3
|
+
本目录为 **Rhea 等服务端点** 的 Wire 级说明,供 **SDK 实现与预检对照**;[`../agentic-lab-sdk.md`](../agentic-lab-sdk.md) 中的 **`process.execute`** 由门控传入 **`items`** 与 **`baseURL`**(服务根),**path、HTTP 方法** 仍由 SDK 按本目录文档固定封装。
|
|
4
|
+
|
|
5
|
+
| 文件 | 说明 |
|
|
6
|
+
|------|------|
|
|
7
|
+
| [execute_process_batch.md](execute_process_batch.md) | `execute_process_batch`:URL、请求体 `items` / `process` / `params` / `table_objects`、响应 `exp_id_list` 等 |
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
| 批量提交任务 | |
|
|
2
|
-
| ------ | --------------------------------------------------------- |
|
|
3
|
-
| url | http://127.0.0.1:8080/api/process/execute\_process\_batch |
|
|
4
|
-
| 方法 | post |
|
|
5
|
-
|
|
6
|
-
## **参数**
|
|
7
|
-
|
|
8
|
-
| 参数名称 | 参数说明 | 参数类型 | 是否必填 | 示例 |
|
|
9
|
-
|----------------------|--------------|----------|-------------------|------------------------------------------|
|
|
10
|
-
| items | 耗材属性<br>list<br>必填 | list | 是 | - |
|
|
11
|
-
| ├─ exp_name | 实验名称 | string | 否 | |
|
|
12
|
-
| ├─ process | 流程模板名称 | string | 是 | "One_to_one" |
|
|
13
|
-
| ├─ priority | 流程优先级 | int | 否,默认为2,数值越高,优先级越高 | |
|
|
14
|
-
| ├─ params | 流程参数 | dict | 是 | 如下所示(JSON):<br>{<br> "@spoon_calib": "",<br> "@second_spoon_calib": "calib",<br> "@calib_retry_times": 0,<br> "@setting_calib_retry_times": 3,<br> "@add_times": 0<br>} |
|
|
15
|
-
| └─ table_objects | 表对象 | dict | 否(可选) | {表名: {id: value}};无表绑定时可省略或 `{}` |
|
|
16
|
-
|
|
17
|
-
```python
|
|
18
|
-
url = f"{base_url}/process/execute_process_batch"
|
|
19
|
-
# process_name = "One_to_more"
|
|
20
|
-
process_name = "workflow_demo_s1"
|
|
21
|
-
|
|
22
|
-
data = {
|
|
23
|
-
"items": [
|
|
24
|
-
{
|
|
25
|
-
"exp_name": "",
|
|
26
|
-
"process": process_name,
|
|
27
|
-
"params": {
|
|
28
|
-
"@spoon_calib": False,
|
|
29
|
-
"@second_spoon_calib": True,
|
|
30
|
-
"@calib_retry_times": 0,
|
|
31
|
-
"@setting_calib_retry_times": 3,
|
|
32
|
-
"@add_times": 0},
|
|
33
|
-
"table_objects": {}
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"exp_name": "",
|
|
37
|
-
"process": process_name,
|
|
38
|
-
"params": {
|
|
39
|
-
"@spoon_calib": False,
|
|
40
|
-
"@second_spoon_calib": True,
|
|
41
|
-
"@calib_retry_times": 0,
|
|
42
|
-
"@setting_calib_retry_times": 3,
|
|
43
|
-
"@add_times": 0},
|
|
44
|
-
"table_objects": {}
|
|
45
|
-
},
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
response = requests.post(url, json=data)
|
|
50
|
-
print(response)
|
|
51
|
-
print(response.json())
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
## **返回值**
|
|
55
|
-
|
|
56
|
-
| 参数名称 | 参数说明 | 参数类型 | 示例 |
|
|
57
|
-
|------------|-------------------|----------|------|
|
|
58
|
-
| results | 批量提交任务的exp_id | json | {<br> "results": {<br> "exp_id_list": [<br> "86cc6fcc-6066-48be-a87a-66f5c370bba5",<br> "6c0719d1-cee8-49ed-bdd5-4c89d83c03da"<br> ]<br> }<br>} |
|
|
1
|
+
| 批量提交任务 | |
|
|
2
|
+
| ------ | --------------------------------------------------------- |
|
|
3
|
+
| url | http://127.0.0.1:8080/api/process/execute\_process\_batch |
|
|
4
|
+
| 方法 | post |
|
|
5
|
+
|
|
6
|
+
## **参数**
|
|
7
|
+
|
|
8
|
+
| 参数名称 | 参数说明 | 参数类型 | 是否必填 | 示例 |
|
|
9
|
+
|----------------------|--------------|----------|-------------------|------------------------------------------|
|
|
10
|
+
| items | 耗材属性<br>list<br>必填 | list | 是 | - |
|
|
11
|
+
| ├─ exp_name | 实验名称 | string | 否 | |
|
|
12
|
+
| ├─ process | 流程模板名称 | string | 是 | "One_to_one" |
|
|
13
|
+
| ├─ priority | 流程优先级 | int | 否,默认为2,数值越高,优先级越高 | |
|
|
14
|
+
| ├─ params | 流程参数 | dict | 是 | 如下所示(JSON):<br>{<br> "@spoon_calib": "",<br> "@second_spoon_calib": "calib",<br> "@calib_retry_times": 0,<br> "@setting_calib_retry_times": 3,<br> "@add_times": 0<br>} |
|
|
15
|
+
| └─ table_objects | 表对象 | dict | 否(可选) | {表名: {id: value}};无表绑定时可省略或 `{}` |
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
url = f"{base_url}/process/execute_process_batch"
|
|
19
|
+
# process_name = "One_to_more"
|
|
20
|
+
process_name = "workflow_demo_s1"
|
|
21
|
+
|
|
22
|
+
data = {
|
|
23
|
+
"items": [
|
|
24
|
+
{
|
|
25
|
+
"exp_name": "",
|
|
26
|
+
"process": process_name,
|
|
27
|
+
"params": {
|
|
28
|
+
"@spoon_calib": False,
|
|
29
|
+
"@second_spoon_calib": True,
|
|
30
|
+
"@calib_retry_times": 0,
|
|
31
|
+
"@setting_calib_retry_times": 3,
|
|
32
|
+
"@add_times": 0},
|
|
33
|
+
"table_objects": {}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"exp_name": "",
|
|
37
|
+
"process": process_name,
|
|
38
|
+
"params": {
|
|
39
|
+
"@spoon_calib": False,
|
|
40
|
+
"@second_spoon_calib": True,
|
|
41
|
+
"@calib_retry_times": 0,
|
|
42
|
+
"@setting_calib_retry_times": 3,
|
|
43
|
+
"@add_times": 0},
|
|
44
|
+
"table_objects": {}
|
|
45
|
+
},
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
response = requests.post(url, json=data)
|
|
50
|
+
print(response)
|
|
51
|
+
print(response.json())
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## **返回值**
|
|
55
|
+
|
|
56
|
+
| 参数名称 | 参数说明 | 参数类型 | 示例 |
|
|
57
|
+
|------------|-------------------|----------|------|
|
|
58
|
+
| results | 批量提交任务的exp_id | json | {<br> "results": {<br> "exp_id_list": [<br> "86cc6fcc-6066-48be-a87a-66f5c370bba5",<br> "6c0719d1-cee8-49ed-bdd5-4c89d83c03da"<br> ]<br> }<br>} |
|
|
@@ -1,204 +1,268 @@
|
|
|
1
|
-
# 流程注册包版式参考(摘录)
|
|
2
|
-
|
|
3
|
-
以下内容与本 skill 内 **[`embedded-template/`](../embedded-template/)** 极简范例目录一致,用于生成新流程注册包时对齐**目录结构**与**关键文件格式**。业务文案以用户提供的流程说明为准。
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. 目录结构(须同构)
|
|
8
|
-
|
|
9
|
-
```text
|
|
10
|
-
<流程注册包根目录>/
|
|
11
|
-
├── SKILL.md
|
|
12
|
-
├── pools/
|
|
13
|
-
│ └── <池显示名称>.md
|
|
14
|
-
├── valves/
|
|
15
|
-
│ └── <门控基名>.md
|
|
16
|
-
└── scripts/
|
|
17
|
-
└── <门控基名>.js
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
- 根目录名 = `SKILL.md` frontmatter 的 `name`(Agent Skills 规范:小写、数字、连字符)。
|
|
21
|
-
- `pools/` 下文件名 = 流程说明数据池表中的**显示名称**(含 `·` 等标点,与模板一致)。
|
|
22
|
-
- `valves/` 与 `scripts/` 下文件名 = **同一基名**;基名规则与模板现有文件一致(如 `Process发射判定`、`查看结果与复核更新`)。
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 2. 根文件 `SKILL.md`:章节顺序与块格式
|
|
27
|
-
|
|
28
|
-
### 2.1 Frontmatter(YAML)
|
|
29
|
-
|
|
30
|
-
```yaml
|
|
31
|
-
---
|
|
32
|
-
name: <与根目录同名-kebab-case>
|
|
33
|
-
description: <≤1024 字符:本流程做什么 + 何时使用该流程注册包,含触发关键词>
|
|
34
|
-
metadata:
|
|
35
|
-
version: "<semver,初次生成为 1.0.0>"
|
|
36
|
-
generated_by: lab-flow-designer
|
|
37
|
-
generated_at: "<YYYY-MM-DD>"
|
|
38
|
-
---
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### 2.2 正文二级标题(须按此顺序)
|
|
42
|
-
|
|
43
|
-
| 顺序 | 二级标题 | 内容要求 |
|
|
44
|
-
|------|----------|----------|
|
|
45
|
-
| 1 | `## 概述` | 1~3 段:业务目标、阶段、Pool/Valve 分工 |
|
|
46
|
-
| 2 | `## 核心概念` | 固定两个三级标题:`### 数据池(Pool)`、`### 门控(Valve)`;Valve 小节内说明 `Processer` 的 `start` / `complete`;`context` 能力列表**仅**能写 [agentic-lab-sdk.md](agentic-lab-sdk.md) 中已有项(勿抄旧模板中的 `processe`) |
|
|
47
|
-
| 3 | `## 流程图` | **Mermaid**:数据池节点 `id[池名]`(矩形/四边形),门控节点 `id{{门控名}}`(六边形);或 ASCII 等价区分。**紧接着** `**连接关系:**` 与编号列表(见 2.3) |
|
|
48
|
-
| 4 | `## 节点清单` | `### Pool 节点(数据池)` 表 + `### Valve 节点(门控)` 表(见 2.4) |
|
|
49
|
-
| 5 | `## 门控执行规范` | `Processer` 代码块(见 2.5) |
|
|
50
|
-
| 6 | `## 使用方式` | 三条编号步骤(见 2.6) |
|
|
51
|
-
|
|
52
|
-
一级标题 `#`:流程名称(来自流程说明)。
|
|
53
|
-
|
|
54
|
-
### 2.2.1 Mermaid 节点形状(须遵守)
|
|
55
|
-
|
|
56
|
-
- **数据池**:`节点ID[显示名称]` → 矩形(四边形)。
|
|
57
|
-
- **门控**:`节点ID{{显示名称}}` → 六边形。
|
|
58
|
-
- 详细与示例见主 `SKILL.md`「生成流程」→ **3.4 `## 流程图`**。
|
|
59
|
-
|
|
60
|
-
### 2.3 `**连接关系:**` 列表格式
|
|
61
|
-
|
|
62
|
-
紧跟流程图,加粗标题 `**连接关系:**`,每条一行:
|
|
63
|
-
|
|
64
|
-
```markdown
|
|
65
|
-
**连接关系:**
|
|
66
|
-
|
|
67
|
-
1. `源节点` → `目标节点`:业务说明
|
|
68
|
-
2. ...
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
源/目标为池或门控的**显示名称**,用反引号包裹;编号连续。
|
|
72
|
-
|
|
73
|
-
### 2.4 节点清单表格列
|
|
74
|
-
|
|
75
|
-
**Pool 节点(数据池)**
|
|
76
|
-
|
|
77
|
-
| 名称 | 文件 | 用途 |
|
|
78
|
-
|------|------|------|
|
|
79
|
-
| … | [pools/<名称>.md](pools/<名称>.md) | … |
|
|
80
|
-
|
|
81
|
-
**Valve 节点(门控)**
|
|
82
|
-
|
|
83
|
-
| 名称 | 文件 | 脚本 | 类型 |
|
|
84
|
-
|------|------|------|------|
|
|
85
|
-
| … | [valves/<基名>.md](valves/<基名>.md) | [scripts/<基名>.js](scripts/<基名>.js) | 自动化 或 人工操作 |
|
|
86
|
-
|
|
87
|
-
### 2.5 `## 门控执行规范` 代码块(`Processer` 类骨架,须保留;不含脚本尾部导出)
|
|
88
|
-
|
|
89
|
-
门控执行顺序:**前置处理(脚本 `start`)→ 人工处理(页面)→ 后置处理(脚本 `complete
|
|
90
|
-
|
|
91
|
-
```javascript
|
|
92
|
-
class Processer {
|
|
93
|
-
constructor(context) {
|
|
94
|
-
this.context = context;
|
|
95
|
-
console.info(`[Processer] v${__ARTIFACT_VERSION__} (skill: ${__ARTIFACT_SKILL__})`);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// --- 前置处理 → start ---
|
|
99
|
-
// params: { valve_id, pool_ids }
|
|
100
|
-
// returns: { orbit_link, ticket_ids }
|
|
101
|
-
async start(params) {
|
|
102
|
-
const { valve_id, pool_ids } = params;
|
|
103
|
-
// 查询入口池数据 → 按需查询化合物/工站/流程 → 写回 detail → 更新 tickets
|
|
104
|
-
// orbit_link = PageUrl.replace('{bookid}', bookid)
|
|
105
|
-
return { orbit_link, ticket_ids };
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// --- 后置处理 → complete ---
|
|
109
|
-
// params: { valve_id, tickets }
|
|
110
|
-
// returns: { new_tickets }
|
|
111
|
-
async complete(params) {
|
|
112
|
-
const { valve_id, tickets } = params;
|
|
113
|
-
// 获取出口池 → 入口池 tickets 更新为 finished → 按出口池映射 new_tickets
|
|
114
|
-
// 由引擎自动创建,脚本不直接追加 tickets
|
|
115
|
-
return { new_tickets };
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
##
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
1
|
+
# 流程注册包版式参考(摘录)
|
|
2
|
+
|
|
3
|
+
以下内容与本 skill 内 **[`embedded-template/`](../embedded-template/)** 极简范例目录一致,用于生成新流程注册包时对齐**目录结构**与**关键文件格式**。业务文案以用户提供的流程说明为准。
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. 目录结构(须同构)
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
<流程注册包根目录>/
|
|
11
|
+
├── SKILL.md
|
|
12
|
+
├── pools/
|
|
13
|
+
│ └── <池显示名称>.md
|
|
14
|
+
├── valves/
|
|
15
|
+
│ └── <门控基名>.md
|
|
16
|
+
└── scripts/
|
|
17
|
+
└── <门控基名>.js
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- 根目录名 = `SKILL.md` frontmatter 的 `name`(Agent Skills 规范:小写、数字、连字符)。
|
|
21
|
+
- `pools/` 下文件名 = 流程说明数据池表中的**显示名称**(含 `·` 等标点,与模板一致)。
|
|
22
|
+
- `valves/` 与 `scripts/` 下文件名 = **同一基名**;基名规则与模板现有文件一致(如 `Process发射判定`、`查看结果与复核更新`)。
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 2. 根文件 `SKILL.md`:章节顺序与块格式
|
|
27
|
+
|
|
28
|
+
### 2.1 Frontmatter(YAML)
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
---
|
|
32
|
+
name: <与根目录同名-kebab-case>
|
|
33
|
+
description: <≤1024 字符:本流程做什么 + 何时使用该流程注册包,含触发关键词>
|
|
34
|
+
metadata:
|
|
35
|
+
version: "<semver,初次生成为 1.0.0>"
|
|
36
|
+
generated_by: lab-flow-designer
|
|
37
|
+
generated_at: "<YYYY-MM-DD>"
|
|
38
|
+
---
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 2.2 正文二级标题(须按此顺序)
|
|
42
|
+
|
|
43
|
+
| 顺序 | 二级标题 | 内容要求 |
|
|
44
|
+
|------|----------|----------|
|
|
45
|
+
| 1 | `## 概述` | 1~3 段:业务目标、阶段、Pool/Valve 分工 |
|
|
46
|
+
| 2 | `## 核心概念` | 固定两个三级标题:`### 数据池(Pool)`、`### 门控(Valve)`;Valve 小节内说明 `Processer` 的 `start` / `complete`;`context` 能力列表**仅**能写 [agentic-lab-sdk.md](agentic-lab-sdk.md) 中已有项(勿抄旧模板中的 `processe`) |
|
|
47
|
+
| 3 | `## 流程图` | **Mermaid**:数据池节点 `id[池名]`(矩形/四边形),门控节点 `id{{门控名}}`(六边形);或 ASCII 等价区分。**紧接着** `**连接关系:**` 与编号列表(见 2.3) |
|
|
48
|
+
| 4 | `## 节点清单` | `### Pool 节点(数据池)` 表 + `### Valve 节点(门控)` 表(见 2.4) |
|
|
49
|
+
| 5 | `## 门控执行规范` | `Processer` 代码块(见 2.5) |
|
|
50
|
+
| 6 | `## 使用方式` | 三条编号步骤(见 2.6) |
|
|
51
|
+
|
|
52
|
+
一级标题 `#`:流程名称(来自流程说明)。
|
|
53
|
+
|
|
54
|
+
### 2.2.1 Mermaid 节点形状(须遵守)
|
|
55
|
+
|
|
56
|
+
- **数据池**:`节点ID[显示名称]` → 矩形(四边形)。
|
|
57
|
+
- **门控**:`节点ID{{显示名称}}` → 六边形。
|
|
58
|
+
- 详细与示例见主 `SKILL.md`「生成流程」→ **3.4 `## 流程图`**。
|
|
59
|
+
|
|
60
|
+
### 2.3 `**连接关系:**` 列表格式
|
|
61
|
+
|
|
62
|
+
紧跟流程图,加粗标题 `**连接关系:**`,每条一行:
|
|
63
|
+
|
|
64
|
+
```markdown
|
|
65
|
+
**连接关系:**
|
|
66
|
+
|
|
67
|
+
1. `源节点` → `目标节点`:业务说明
|
|
68
|
+
2. ...
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
源/目标为池或门控的**显示名称**,用反引号包裹;编号连续。
|
|
72
|
+
|
|
73
|
+
### 2.4 节点清单表格列
|
|
74
|
+
|
|
75
|
+
**Pool 节点(数据池)**
|
|
76
|
+
|
|
77
|
+
| 名称 | 文件 | 用途 |
|
|
78
|
+
|------|------|------|
|
|
79
|
+
| … | [pools/<名称>.md](pools/<名称>.md) | … |
|
|
80
|
+
|
|
81
|
+
**Valve 节点(门控)**
|
|
82
|
+
|
|
83
|
+
| 名称 | 文件 | 脚本 | 类型 |
|
|
84
|
+
|------|------|------|------|
|
|
85
|
+
| … | [valves/<基名>.md](valves/<基名>.md) | [scripts/<基名>.js](scripts/<基名>.js) | 自动化 或 人工操作 |
|
|
86
|
+
|
|
87
|
+
### 2.5 `## 门控执行规范` 代码块(`Processer` 类骨架,须保留;不含脚本尾部导出)
|
|
88
|
+
|
|
89
|
+
门控执行顺序:**前置处理(脚本 `start`)→ 人工处理(页面)→ 后置处理(脚本 `complete`)**(人工触发门控)或 **`run`**(自动触发门控)。参数与返回值**一律 snake_case**(对齐 [agentic-lab-processer.md](agentic-lab-processer.md))。
|
|
90
|
+
|
|
91
|
+
```javascript
|
|
92
|
+
class Processer {
|
|
93
|
+
constructor(context) {
|
|
94
|
+
this.context = context;
|
|
95
|
+
console.info(`[Processer] v${__ARTIFACT_VERSION__} (skill: ${__ARTIFACT_SKILL__})`);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// --- 前置处理 → start ---
|
|
99
|
+
// params: { valve_id, pool_ids }
|
|
100
|
+
// returns: { orbit_link, ticket_ids }
|
|
101
|
+
async start(params) {
|
|
102
|
+
const { valve_id, pool_ids } = params;
|
|
103
|
+
// 查询入口池数据 → 按需查询化合物/工站/流程 → 写回 detail → 更新 tickets
|
|
104
|
+
// orbit_link = PageUrl.replace('{bookid}', bookid)
|
|
105
|
+
return { orbit_link, ticket_ids };
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// --- 后置处理 → complete ---
|
|
109
|
+
// params: { valve_id, tickets }
|
|
110
|
+
// returns: { new_tickets }
|
|
111
|
+
async complete(params) {
|
|
112
|
+
const { valve_id, tickets } = params;
|
|
113
|
+
// 获取出口池 → 入口池 tickets 更新为 finished → 按出口池映射 new_tickets
|
|
114
|
+
// 由引擎自动创建,脚本不直接追加 tickets
|
|
115
|
+
return { new_tickets };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**自动触发门控**的 `Processer` 骨架使用 `run` 替代 `start` + `complete`(详见 [agentic-lab-processer.md](agentic-lab-processer.md)):
|
|
121
|
+
|
|
122
|
+
```javascript
|
|
123
|
+
class Processer {
|
|
124
|
+
constructor(context) {
|
|
125
|
+
this.context = context;
|
|
126
|
+
console.info(`[Processer] v${__ARTIFACT_VERSION__} (skill: ${__ARTIFACT_SKILL__})`);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// --- 自动触发 → run ---
|
|
130
|
+
// params: { valve_id, pool_ids }
|
|
131
|
+
// returns: { new_tickets }
|
|
132
|
+
async run(params) {
|
|
133
|
+
const { valve_id, pool_ids } = params;
|
|
134
|
+
// 查询入口池数据 → 执行业务逻辑 → 获取出口池 → 入口池 tickets 更新为 finished → 映射 new_tickets
|
|
135
|
+
return { new_tickets };
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### 2.6 `## 使用方式`(三条,语义对齐)
|
|
141
|
+
|
|
142
|
+
```markdown
|
|
143
|
+
## 使用方式
|
|
144
|
+
|
|
145
|
+
1. 查看各 Pool 的 [pools/](pools/) 目录了解数据表结构
|
|
146
|
+
2. 查看各 Valve 的 [valves/](valves/) 目录了解门控逻辑和脚本路径
|
|
147
|
+
3. 执行门控时,调用对应脚本的 `Processer` 类
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## 3. `pools/<池名>.md` 格式(节选范例)
|
|
153
|
+
|
|
154
|
+
以下与 [`../embedded-template/pools/入口池.md`](../embedded-template/pools/入口池.md) 同构,仅示意**标题层级与 Schema 表头**;行数据按流程说明填写。
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
# 入口池
|
|
158
|
+
|
|
159
|
+
## 概述
|
|
160
|
+
|
|
161
|
+
流程入口池,存放尚未经门控处理的记录。
|
|
162
|
+
|
|
163
|
+
## Schema
|
|
164
|
+
|
|
165
|
+
| 字段 | 字段标题 | 字段描述 | 字段类型 | 属性 | 默认值 |
|
|
166
|
+
|------|----------|----------|----------|------|--------|
|
|
167
|
+
| id | ID | 业务主键 | string | | - |
|
|
168
|
+
| detail | Detail | 业务明细 JSON | json | | - |
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**字段列**:仅 snake_case(`a-z`、数字、`_`)。**字段标题**:展示用名称,与流程说明或业务用语对齐。
|
|
172
|
+
|
|
173
|
+
**属性列规则**:流程说明里若写清枚举/可选值,写入 `枚举:…`;若写清日期或时间串格式,写入 `格式:…`;否则该格留空。
|
|
174
|
+
|
|
175
|
+
### 模型引用(可选)
|
|
176
|
+
|
|
177
|
+
若流程说明为该数据池指定了 3D 模型文件,在 `## Schema` 之后添加:
|
|
178
|
+
|
|
179
|
+
```markdown
|
|
180
|
+
## 模型引用
|
|
181
|
+
|
|
182
|
+
| 属性 | 值 |
|
|
183
|
+
|------|-----|
|
|
184
|
+
| 名称 | (模型文件名称) |
|
|
185
|
+
| 版本 | (模型版本) |
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
无模型引用时**省略本节**(不写空占位)。
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## 4. `valves/<基名>.md` 格式(节选范例)
|
|
193
|
+
|
|
194
|
+
以下与 [`../embedded-template/valves/示例数据与校验门控.md`](../embedded-template/valves/示例数据与校验门控.md) 同风格节选;`输入/输出` 须与用户流程说明中门控 YAML 一致(勿照搬范例中的池名)。
|
|
195
|
+
|
|
196
|
+
```markdown
|
|
197
|
+
# 示例数据与校验门控
|
|
198
|
+
|
|
199
|
+
## 概述
|
|
200
|
+
|
|
201
|
+
演示门控文档结构:门控 YAML、化合物数据查询方式、字段映射、数据处理规则、start/complete 分工。
|
|
202
|
+
|
|
203
|
+
## 关联脚本
|
|
204
|
+
|
|
205
|
+
**脚本路径**: [scripts/示例数据与校验门控.js](scripts/示例数据与校验门控.js)
|
|
206
|
+
|
|
207
|
+
该脚本导出 `Processer` 类,实现 `start` 和 `complete` 方法。
|
|
208
|
+
|
|
209
|
+
## 执行流程
|
|
210
|
+
|
|
211
|
+
1. **start 阶段**:按 [agentic-lab-sdk.md](agentic-lab-sdk.md) 查询入口池数据 → 按需调用其他 SDK 方法查询外部数据 → 写回 `detail` → 按 SDK 更新 tickets。
|
|
212
|
+
2. **complete 阶段**:按 [agentic-lab-sdk.md](agentic-lab-sdk.md) 获取出口池 → 更新入口池 ticket 状态 → 映射出口池 `new_tickets`。
|
|
213
|
+
|
|
214
|
+
## 输入/输出
|
|
215
|
+
|
|
216
|
+
- **输入池**: 入口池
|
|
217
|
+
- **输出池**: 出口池
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### 触发方式(推荐,缺省为人工触发)
|
|
221
|
+
|
|
222
|
+
每个门控文档建议在 `## 关联脚本` 之后包含 `## 触发方式`:
|
|
223
|
+
|
|
224
|
+
```markdown
|
|
225
|
+
## 触发方式
|
|
226
|
+
|
|
227
|
+
人工触发
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
取值为 `自动触发` 或 `人工触发`。未指定时默认按**人工触发**处理:
|
|
231
|
+
- **人工触发**(默认):门控执行顺序为 前置处理(脚本 `start`)→ 人工处理(页面)→ 后置处理(脚本 `complete`),脚本实现 `start` + `complete`。
|
|
232
|
+
- **自动触发**:门控无人工处理阶段,脚本实现 `run` 方法(见 [agentic-lab-processer.md](agentic-lab-processer.md))。
|
|
233
|
+
|
|
234
|
+
### 模型引用(可选)
|
|
235
|
+
|
|
236
|
+
若流程说明为该门控指定了 3D 模型文件,添加:
|
|
237
|
+
|
|
238
|
+
```markdown
|
|
239
|
+
## 模型引用
|
|
240
|
+
|
|
241
|
+
| 属性 | 值 |
|
|
242
|
+
|------|-----|
|
|
243
|
+
| 名称 | (模型文件名称) |
|
|
244
|
+
| 版本 | (模型版本) |
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
无模型引用时**省略本节**(不写空占位)。
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## 5. `scripts/<基名>.js` 格式
|
|
252
|
+
|
|
253
|
+
- 与模板相同:`Processer` 类、`constructor(context)`、`async start` / `async complete`。**脚本以 `Processer` 类定义结束,禁止在类之后添加** `return`、`module.exports`、`export default` 或任何导出语句——导出由运行环境处理。
|
|
254
|
+
- **API 以** [agentic-lab-sdk.md](agentic-lab-sdk.md) **为准**,勿使用未列出的 `context` 成员。
|
|
255
|
+
- **按需实现**:仅流程说明在本门控下**明确需要**的查询、写回与路由才写代码;**禁止**为对齐示例而复制与本门控无关的 `context` 调用或 `ticket.detail` 键。
|
|
256
|
+
- 与流程说明中的「数据查询方式 / 字段映射 / 数据处理规则」对齐的**可运行骨架**(结构参考),见 [`../embedded-template/scripts/示例数据与校验门控.js`](../embedded-template/scripts/示例数据与校验门控.js);验证命令与核对项见主 `SKILL.md` **验证生成结果**。
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## 6. 本 skill 内对照关系
|
|
261
|
+
|
|
262
|
+
| 位置 | 用途 |
|
|
263
|
+
|------|------|
|
|
264
|
+
| [`embedded-template/`](../embedded-template/) | **缩小真目录**:与产出包同构,优先打开对照链接与章节 |
|
|
265
|
+
| 本文件(`skill-package-layout.md`) | **条文摘要**:表格列名、`Processer` 块、连接关系写法 |
|
|
266
|
+
| [agentic-lab-sdk.md](agentic-lab-sdk.md) | **门控脚本 API**:`this.context` 仅使用其中已列成员 |
|
|
267
|
+
|
|
268
|
+
生成时以用户流程说明为数据源;版式优先对齐 `embedded-template/` 与本文件。
|