mm_workflow 1.5.0 → 1.6.1
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/common/mod/dispatcher/load_balance/index.js +8 -6
- package/common/mod/executor/custom/index.js +7 -8
- package/common/mod/generator/llm_gen_workflow/index.js +113 -100
- package/common/mod/manager/database/index.js +39 -26
- package/common/mod/manager/discovery/index.js +17 -3
- package/common/mod/manager/json_util.js +43 -31
- package/common/mod/observer/audit/index.js +7 -4
- package/common/mod/observer/prometheus/index.js +59 -42
- package/common/mod/receiver/webhook/index.js +30 -11
- package/index.js +0 -4
- package/kernel/blockly_converter.js +55 -33
- package/kernel/blockly_defs.js +88 -71
- package/kernel/bpmn_parser.js +27 -15
- package/kernel/kernel.js +145 -103
- package/kernel/kernel_config.js +33 -7
- package/kernel/workflow_engine.js +30 -17
- package/kernel/workflow_state.js +25 -8
- package/package.json +19 -11
- package/tool/circuit_breaker/index.js +187 -5
- package/tool/ip_block/index.js +20 -5
- package/tool/rate_limit/index.js +49 -5
- package/tool/sensitive/index.js +29 -5
- package/tool/spam/index.js +30 -5
- package/tool/sql_inject/index.js +35 -5
- package/tool/workflow_admin/index.js +65 -0
- package/tool/workflow_admin/tool.json +40 -0
- package/tool/workflow_run/index.js +81 -0
- package/tool/workflow_run/tool.json +60 -0
- package/common/workflow/wftest_1789472356864/ok_wf.json +0 -20
- package/common/workflow/wftest_1789472356864/suggest_h.json +0 -14
- package/common/workflow/wftest_1789472528456/ok_wf.json +0 -20
- package/common/workflow/wftest_1789472528456/suggest_h.json +0 -14
- package/common/workflow/wftest_1789472914308/ok_wf.json +0 -20
- package/common/workflow/wftest_1789472914308/suggest_h.json +0 -14
- package/common/workflow/wftest_1789472926735/ok_wf.json +0 -20
- package/common/workflow/wftest_1789472926735/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473005165/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473005165/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473128440/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473128440/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473140984/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473140984/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473444205/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473444205/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473632028/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473632028/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473735755/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473735755/suggest_h.json +0 -14
- package/common/workflow/wftest_1789473793373/ok_wf.json +0 -20
- package/common/workflow/wftest_1789473793373/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474054650/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474054650/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474139961/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474139961/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474522109/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474522109/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474695647/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474695647/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474822920/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474822920/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474863955/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474863955/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474920642/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474920642/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474948523/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474948523/suggest_h.json +0 -14
- package/common/workflow/wftest_1789474977320/ok_wf.json +0 -20
- package/common/workflow/wftest_1789474977320/suggest_h.json +0 -14
- package/common/workflow/wftest_1789475013956/ok_wf.json +0 -20
- package/common/workflow/wftest_1789475013956/suggest_h.json +0 -14
- package/common/workflow/wftest_1789476776624/ok_wf.json +0 -20
- package/common/workflow/wftest_1789476776624/suggest_h.json +0 -14
- package/common/workflow/wftest_1789477074699/ok_wf.json +0 -20
- package/common/workflow/wftest_1789477074699/suggest_h.json +0 -14
- package/common/workflow/wftest_1789478655100/ok_wf.json +0 -20
- package/common/workflow/wftest_1789478655100/suggest_h.json +0 -14
- package/common/workflow/wftest_1789499010987/ok_wf.json +0 -20
- package/common/workflow/wftest_1789499010987/suggest_h.json +0 -14
- package/common/workflow/wftest_1789519488954/ok_wf.json +0 -20
- package/common/workflow/wftest_1789519488954/suggest_h.json +0 -14
- package/docs/API/345/217/202/350/200/203.md +0 -146
- package/docs/Blockly/346/230/240/345/260/204/346/226/271/346/241/210.md +0 -213
- package/docs/LLM/351/233/206/346/210/220/346/214/207/345/215/227.md +0 -29
- package/docs/Workflow/347/274/226/345/206/231/346/214/207/345/215/227.md +0 -194
- package/docs/ctx/344/270/212/344/270/213/346/226/207/350/257/246/350/247/243.md +0 -256
- package/docs//344/272/214/346/254/241/345/274/200/345/217/221/346/214/207/345/215/227.md +0 -151
- package/docs//345/244/232/345/215/217/350/256/256/350/247/246/345/217/221/346/214/207/345/215/227.md +0 -272
- package/docs//345/256/236/346/210/230/346/241/210/344/276/213.md +0 -392
- package/docs//345/267/245/344/275/234/346/265/201/350/246/206/347/233/226/345/210/206/346/236/220.md +0 -585
- package/docs//345/274/200/345/217/221/346/226/207/346/241/243.md +0 -200
- package/docs//345/277/253/351/200/237/345/274/200/345/247/213.md +0 -66
- package/docs//346/234/200/344/275/263/345/256/236/350/267/265.md +0 -265
- package/docs//346/236/266/346/236/204/350/256/276/350/256/241.md +0 -29
- package/docs//346/240/270/345/277/203/346/246/202/345/277/265.md +0 -194
- package/docs//346/250/241/345/235/227/344/275/223/347/263/273/350/257/264/346/230/216.md +0 -111
- package/docs//346/250/241/345/235/227/346/270/205/345/215/225.md +0 -288
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/AI/345/267/245/344/275/234/346/265/201/347/224/237/346/210/220/346/210/220/346/234/254/345/210/206/346/236/220.md +0 -234
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/CM/345/207/275/346/225/260/345/244/247/345/205/250.md +0 -93
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212/RPG_Maker_/344/272/213/344/273/266/350/204/232/346/234/254/345/257/271/346/257/224/345/210/206/346/236/220.md +0 -734
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/270/211/345/233/275/346/235/200/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -379
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/277/256/344/273/231/345/206/263/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -256
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//344/277/256/344/273/231/347/211/210/345/215/241/347/211/214/346/270/270/346/210/217.md +0 -355
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/206/222/351/231/251/345/262/233CM/345/207/275/346/225/260/345/210/206/346/236/220.md +0 -81
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/206/222/351/231/251/345/262/233NPC/350/204/232/346/234/254/346/224/257/346/214/201/345/210/206/346/236/220.md +0 -365
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/244/247/351/203/250/345/210/206/351/200/232/347/224/250/346/250/241/345/235/227/345/210/206/346/236/220.md +0 -33
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//345/260/217/345/225/206/345/272/227/351/234/200/346/261/202/350/247/204/346/240/274.md +0 -577
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/250/241/346/213/237/344/272/272/347/224/237/346/201/213/347/210/261/345/205/273/346/210/220RPG/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -314
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/255/243/345/274/217/345/217/257/347/224/250/345/267/256/350/267/235/345/210/206/346/236/220.md +0 -463
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//346/270/270/346/210/217/347/216/213/345/215/241/347/211/214/346/270/270/346/210/217/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -673
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//350/264/252/345/251/252/344/271/213/345/262/233/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -405
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//350/264/252/345/251/252/344/271/213/345/262/233/347/262/276/347/256/200/347/211/210/345/217/257/350/241/214/346/200/247/345/210/206/346/236/220.md +0 -289
- package/docs//350/256/276/350/256/241/345/210/206/346/236/220/346/212/245/345/221/212//351/207/215/350/243/205/346/234/272/345/205/265/346/226/207/345/255/227/347/211/210/346/270/270/346/210/217.md +0 -417
- package/docs//350/260/203/350/257/225/344/270/216/346/216/222/351/224/231.md +0 -255
- package/example/common/mod/executor/effect/executor.json +0 -58
- package/example/common/mod/executor/effect/index.js +0 -93
- package/example/common/mod/executor/warp/executor.json +0 -57
- package/example/common/mod/executor/warp/index.js +0 -73
- package/example/common/mod/manager/inventory/index.js +0 -205
- package/example/common/mod/manager/inventory/manager.json +0 -70
- package/example/common/mod/manager/persistence/index.js +0 -176
- package/example/common/mod/manager/persistence/manager.json +0 -67
- package/example/common/mod/manager/player/index.js +0 -187
- package/example/common/mod/manager/player/manager.json +0 -102
- package/example/common/mod/manager/quest/index.js +0 -196
- package/example/common/mod/manager/quest/manager.json +0 -50
- package/example/common/mod/manager/shop/index.js +0 -66
- package/example/common/mod/manager/shop/manager.json +0 -44
- package/example/common/mod/manager/skill/index.js +0 -143
- package/example/common/mod/manager/skill/manager.json +0 -82
- package/example/common/script/demo/index.js +0 -16
- package/example/common/script/demo/script.json +0 -21
- package/example/common/workflow/admin/dashboard.json +0 -87
- package/example/common/workflow/admin/order_deliver.json +0 -99
- package/example/common/workflow/admin/order_list.json +0 -79
- package/example/common/workflow/admin/product_off.json +0 -85
- package/example/common/workflow/admin/product_on.json +0 -85
- package/example/common/workflow/admin/user_list.json +0 -68
- package/example/common/workflow/cart/add.json +0 -86
- package/example/common/workflow/cart/checkout.json +0 -120
- package/example/common/workflow/cart/del.json +0 -47
- package/example/common/workflow/cart/list.json +0 -55
- package/example/common/workflow/cart/set.json +0 -106
- package/example/common/workflow/db/create_table.json +0 -57
- package/example/common/workflow/db/mysql_query.json +0 -47
- package/example/common/workflow/db/sqlite_crud.json +0 -48
- package/example/common/workflow/npc/blacksmith.json +0 -91
- package/example/common/workflow/npc/quest_giver.json +0 -136
- package/example/common/workflow/order/create.json +0 -76
- package/example/common/workflow/order/create_bpmn.json +0 -105
- package/example/common/workflow/order/history.json +0 -69
- package/example/common/workflow/payment/process.json +0 -74
- package/example/common/workflow/product/add.json +0 -72
- package/example/common/workflow/product/categories.json +0 -41
- package/example/common/workflow/product/count.json +0 -65
- package/example/common/workflow/product/del.json +0 -84
- package/example/common/workflow/product/get.json +0 -59
- package/example/common/workflow/product/list.json +0 -80
- package/example/common/workflow/product/search.json +0 -59
- package/example/common/workflow/product/set.json +0 -87
- package/example/common/workflow/shop/create.json +0 -70
- package/example/common/workflow/shop/del.json +0 -84
- package/example/common/workflow/shop/get.json +0 -43
- package/example/common/workflow/shop/list.json +0 -80
- package/example/common/workflow/shop/products.json +0 -69
- package/example/common/workflow/shop/set.json +0 -64
- package/example/common/workflow/system/monitor.json +0 -62
- package/example/common/workflow/user/address_add.json +0 -49
- package/example/common/workflow/user/address_list.json +0 -44
- package/example/common/workflow/user/change_password.json +0 -87
- package/example/common/workflow/user/login.json +0 -83
- package/example/common/workflow/user/profile.json +0 -71
- package/example/common/workflow/user/register.json +0 -77
- package/example/config +0 -122
- package/example/config.json +0 -94
- package/example/data/model/bag.json +0 -28
- package/example/data/model/character.json +0 -38
- package/example/data/model/quest.json +0 -14
- package/example/data/model/save.json +0 -10
- package/example/data/model/shop.json +0 -14
- package/example/data/model/skill.json +0 -28
- package/example/data/test.js +0 -365
- package/example/db/mm.db +0 -0
- package/example/db/mm.db-shm +0 -0
- package/example/db/mm.db-wal +0 -0
- package/example/db/sql/ecommerce.sql +0 -84
- package/example/db/sql/game.sql +0 -72
- package/example/ecom_out.txt +0 -0
- package/example/ecommerce.js +0 -450
- package/example/index.js +0 -262
- package/example/npc_demo.js +0 -361
- package/lib/tools/circuit_breaker/index.js +0 -164
- package/lib/tools/index.js +0 -16
- package/lib/tools/ip_block/index.js +0 -20
- package/lib/tools/rate_limit/index.js +0 -49
- package/lib/tools/sensitive/index.js +0 -29
- package/lib/tools/spam/index.js +0 -30
- package/lib/tools/sql_inject/index.js +0 -35
- package/llm.js +0 -257
- package/scan_modules.js +0 -124
- package/scripts/add_type_field.js +0 -153
- package/scripts/create_project.js +0 -276
- package/scripts/generate_mod.js +0 -229
- package/templates/db/backup_table.json +0 -52
- package/templates/db/create_table.json +0 -68
- package/templates/db/crud_sqlite.json +0 -98
- package/templates/db/db_sqlite.json +0 -52
- package/templates/db/ecommerce.sql +0 -87
- package/templates/db/export_table.json +0 -51
- package/templates/demo/hello.json +0 -47
- package/templates/demo/http_demo.json +0 -48
- package/templates/demo/llm_chat.json +0 -44
- package/templates/demo/render_demo.json +0 -46
- package/templates/demo/validator_demo.json +0 -64
- package/templates/order/create.json +0 -113
- package/templates/user_account/add.json +0 -92
- package/templates/user_account/count.json +0 -24
- package/templates/user_account/del.json +0 -38
- package/templates/user_account/get.json +0 -48
- package/templates/user_account/init.json +0 -76
- package/templates/user_account/list.json +0 -48
- package/templates/user_account/set.json +0 -65
- package/templates/user_account/user_account.sql +0 -21
- package/test.js +0 -253
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789474977320",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789475013956",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789476776624",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789477074699",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789478655100",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789499010987",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ok_wf",
|
|
3
|
-
"title": "测试工作流",
|
|
4
|
-
"description": "",
|
|
5
|
-
"group": "wftest_1789519488954",
|
|
6
|
-
"version": "1.0",
|
|
7
|
-
"steps": [
|
|
8
|
-
{
|
|
9
|
-
"id": "s1",
|
|
10
|
-
"operator": "calculator",
|
|
11
|
-
"handler": "sum",
|
|
12
|
-
"params": {
|
|
13
|
-
"values": [
|
|
14
|
-
1,
|
|
15
|
-
2
|
|
16
|
-
]
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# API 参考
|
|
2
|
-
|
|
3
|
-
## 入口
|
|
4
|
-
|
|
5
|
-
```javascript
|
|
6
|
-
const mm = require('mm_kernel');
|
|
7
|
-
|
|
8
|
-
// 一行启动
|
|
9
|
-
const app = await mm.start(config?);
|
|
10
|
-
|
|
11
|
-
// 一行执行
|
|
12
|
-
const result = await app.run('group', 'workflow_id', input, meta?);
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Kernel
|
|
16
|
-
|
|
17
|
-
| 方法 | 说明 |
|
|
18
|
-
| ----------------------------------------------------- | --------------------------------------------------------------- |
|
|
19
|
-
| `Kernel.start(config?)` | 静态工厂:创建 + boot,返回实例 |
|
|
20
|
-
| `await kernel.boot()` | 启动:加载模块 + 工作流 |
|
|
21
|
-
| `await kernel.run(group, id, input, meta?, options?)` | 执行工作流。`options.dry_run=true` 开启空跑模式 |
|
|
22
|
-
| `kernel.getWorkflow(group, id)` | 获取工作流蓝图 |
|
|
23
|
-
| `kernel.validateWorkflow(workflow)` | 静态校验 workflow JSON,返回错误数组 `[{step, field, message}]` |
|
|
24
|
-
| `kernel.suggestWorkflow(workflow)` | 基于校验错误生成修正建议 `[{step, type, message, fix}]` |
|
|
25
|
-
| `kernel.getModuleCatalog()` | 返回全部模块的 params/returns schema(含 group 分组) |
|
|
26
|
-
| `kernel.getWorkflowCatalog()` | 返回全部工作流的 input_schema/output_schema |
|
|
27
|
-
| `kernel.findByGroup(group)` | 按分组名查找模块,返回 `{ category: { name: module } }` |
|
|
28
|
-
| `kernel.getGroups()` | 返回所有分组及其模块统计 |
|
|
29
|
-
| `kernel.operators` | 模块树:`operators[category][handler]` |
|
|
30
|
-
|
|
31
|
-
## WorkflowEngine (高级用法)
|
|
32
|
-
|
|
33
|
-
| 方法 | 说明 |
|
|
34
|
-
| --------------------------------- | -------------- |
|
|
35
|
-
| `new WorkflowEngine(kernel)` | 创建引擎实例 |
|
|
36
|
-
| `await engine.run(workflow, ctx)` | 执行工作流蓝图 |
|
|
37
|
-
|
|
38
|
-
## $.config
|
|
39
|
-
|
|
40
|
-
| 方法 | 说明 |
|
|
41
|
-
| ---------------------------------------- | -------------------- |
|
|
42
|
-
| `await $.config.get('模块名')` | 返回模块合并配置对象 |
|
|
43
|
-
| `await $.config.get('env.VAR')` | 读取环境变量 |
|
|
44
|
-
| `await $.config.set('key', val)` | 设置全局变量 |
|
|
45
|
-
| `await $.config.set('模块名.字段', val)` | 覆盖模块选项 |
|
|
46
|
-
| `await $.config.has('key')` | 检查是否存在 |
|
|
47
|
-
| `await $.config.all()` | 返回全部 kv |
|
|
48
|
-
| `await $.config.del('key')` | 删除 |
|
|
49
|
-
|
|
50
|
-
## workflow JSON 结构
|
|
51
|
-
|
|
52
|
-
```typescript
|
|
53
|
-
interface Workflow {
|
|
54
|
-
name: string; // 唯一标识
|
|
55
|
-
description: string; // 描述
|
|
56
|
-
input_schema?: Schema; // 入参 schema(推荐)
|
|
57
|
-
output_schema?: Schema; // 出参 schema(推荐)
|
|
58
|
-
steps: Step[];
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
interface Step {
|
|
62
|
-
id?: string; // 步骤 ID(推荐设置,支持命名引用)
|
|
63
|
-
description?: string; // 步骤描述(LLM友好,引擎不解析)
|
|
64
|
-
operator: string; // 分类名
|
|
65
|
-
handler: string; // 模块名
|
|
66
|
-
params?: object; // 模块参数(支持 {{ }} 插值)
|
|
67
|
-
on_error?:
|
|
68
|
-
| string
|
|
69
|
-
| {
|
|
70
|
-
// 错误处理
|
|
71
|
-
retry?: number;
|
|
72
|
-
retry_delay?: number;
|
|
73
|
-
fallback?: object;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## validateWorkflow (静态校验)
|
|
79
|
-
|
|
80
|
-
在工作流运行前静态分析 workflow JSON,拦截以下 9 类错误:
|
|
81
|
-
|
|
82
|
-
| 校验项 | 示例 | 说明 |
|
|
83
|
-
|--------|------|------|
|
|
84
|
-
| 缺少 operator | `step[2] 缺少operator字段` | 步骤声明缺失 |
|
|
85
|
-
| operator 不存在 | `器 "xxx" 不存在` | 分类名拼写错误 |
|
|
86
|
-
| handler 不存在 | `模块 "validator.abc" 不存在` | 模块名拼写错误 |
|
|
87
|
-
| 模块缺少 main 方法 | `模块 "manager.broken" 缺少main方法` | index.js 未导出 main |
|
|
88
|
-
| 缺少必填参数 | `缺少模块必填参数: table (模块 manager.mysql 要求: table)` | params 不完整 |
|
|
89
|
-
| 参数不在白名单 | `参数 "tbl" 未在模块 manager.mysql 的schema中定义,可用: table, data` | 字段名拼写错误 |
|
|
90
|
-
| `$steps.id` 引用无效 | `引用了不存在的步骤: $steps.lookup` | 前置步骤缺失 |
|
|
91
|
-
| `on_error` 跳转无效 | `跳转目标 "cleanup" 不存在` | 错误处理目标缺失 |
|
|
92
|
-
| 重复步骤 id | `重复的步骤id: validate` | id 冲突 |
|
|
93
|
-
|
|
94
|
-
```javascript
|
|
95
|
-
var errors = app.validateWorkflow(workflow);
|
|
96
|
-
if (errors.length > 0) {
|
|
97
|
-
errors.forEach(function (e) {
|
|
98
|
-
console.log('[' + e.step + '] ' + e.field + ': ' + e.message);
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## suggestWorkflow (智能建议)
|
|
104
|
-
|
|
105
|
-
在 `validateWorkflow` 基础上,根据模块 schema 自动生成修正建议。覆盖 4 类问题:
|
|
106
|
-
|
|
107
|
-
| 建议类型 | 触发条件 | fix 字段 |
|
|
108
|
-
|----------|----------|----------|
|
|
109
|
-
| `field_typo` | 参数名不在 schema 中但存在接近匹配 | `{ field, replace_with }` |
|
|
110
|
-
| `missing_required` | 缺少 schema.required 中的字段 | `{ field, add_value }` |
|
|
111
|
-
| `steps_ref` | `$steps.X` 引用了不存在的步骤 id | `{ path, replace_with }` |
|
|
112
|
-
| `steps_type` | `$steps.X` 返回对象但上下文期望标量 | `{ path, replace_with }` |
|
|
113
|
-
|
|
114
|
-
```javascript
|
|
115
|
-
var suggestions = app.suggestWorkflow(broken_wf);
|
|
116
|
-
suggestions.forEach(function (s) {
|
|
117
|
-
console.log('[' + s.step + '] ' + s.type + ': ' + s.message);
|
|
118
|
-
// 可程序化应用: params[s.fix.field] → s.fix.replace_with
|
|
119
|
-
});
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
配合使用流程: `validateWorkflow` 发现错误 → `suggestWorkflow` 获取建议 → 手工修正 → `validateWorkflow` 复核。
|
|
123
|
-
|
|
124
|
-
## Dry-Run 模式
|
|
125
|
-
|
|
126
|
-
不产生副作用的空跑执行:变量插值正常解析、参数 schema 正常校验,但不实际调用模块。
|
|
127
|
-
|
|
128
|
-
```javascript
|
|
129
|
-
// 正常执行: 写入数据库、发送请求
|
|
130
|
-
var result = await app.run('order', 'create', input);
|
|
131
|
-
|
|
132
|
-
// 空跑模式: 只校验链路,不写库不发送
|
|
133
|
-
var result = await app.run('order', 'create', input, null, { dry_run: true });
|
|
134
|
-
|
|
135
|
-
// 返回结构:
|
|
136
|
-
// {
|
|
137
|
-
// output: {},
|
|
138
|
-
// nodes: [
|
|
139
|
-
// { step: 0, operator: 'validator', handler: 'params', result: { dry_run: true, params: {...} } },
|
|
140
|
-
// { step: 1, operator: 'manager', handler: 'mysql', result: { dry_run: true, params: {...} } },
|
|
141
|
-
// ...
|
|
142
|
-
// ]
|
|
143
|
-
// }
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
配合 `validateWorkflow` 使用:先校验 JSON 结构正确 -> 再 Dry-Run 验证变量链路 -> 最后正式执行。
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
# Blockly 积木编程与 workflow.json 映射方案
|
|
2
|
-
|
|
3
|
-
## 1. 背景与目标
|
|
4
|
-
|
|
5
|
-
当前 workflow.json 是声明式流程编排 DSL,用户以 JSON 方式编写流程。本方案引入 Google Blockly 积木编程,将 Blockly 作为 workflow.json 的图形化编写工具,降低编写门槛。
|
|
6
|
-
|
|
7
|
-
目标:
|
|
8
|
-
|
|
9
|
-
- **正向**:拖拽积木生成 workflow.json(BPMN 模式 `nodes` + `flows`),复用现有归一化链路执行
|
|
10
|
-
- **反向**:已存 workflow.json 渲染回 Blockly 画布,便于可视化查看与二次编辑
|
|
11
|
-
- **积木库**:由现有 `common/mod/*/*.json` 模块描述自动生成,无需手工维护
|
|
12
|
-
|
|
13
|
-
目标格式采用 BPMN 模式(`nodes` + `flows`),该模式本身是"图 + 边"结构,与 Blockly 积木连接模型天然对应。
|
|
14
|
-
|
|
15
|
-
## 2. 总体架构
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
Blockly 画布 (XML/JSON 积木树)
|
|
19
|
-
| BlocklyConverter.toWorkflow() [新增 kernel/blockly_converter.js]
|
|
20
|
-
v
|
|
21
|
-
workflow.json (nodes + flows) <- 存盘格式
|
|
22
|
-
| normalizeWorkflow() [已有 kernel/workflow_normalizer.js]
|
|
23
|
-
v
|
|
24
|
-
workflow.steps (可执行步骤)
|
|
25
|
-
| WorkflowEngine.run() [已有 kernel/workflow_engine.js]
|
|
26
|
-
v
|
|
27
|
-
执行结果
|
|
28
|
-
^
|
|
29
|
-
| BlocklyConverter.toBlockly() [新增,反向可视化]
|
|
30
|
-
| BpmnMapper.toBpmn() [已有 kernel/bpmn_mapper.js]
|
|
31
|
-
workflow.json
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
各环节依赖关系:
|
|
35
|
-
|
|
36
|
-
- `blockly_converter.js` 依赖 `bpmn_mapper.js` 的节点类型约定与反向图遍历思路
|
|
37
|
-
- `blockly_defs.js` 扫描 `common/mod` 目录下的模块描述 JSON 生成积木定义
|
|
38
|
-
- 正向产物直接走既有 `normalizeWorkflow` + `WorkflowEngine` 执行,不改动引擎核心
|
|
39
|
-
|
|
40
|
-
## 3. 积木库设计
|
|
41
|
-
|
|
42
|
-
积木分为三类:流程控制积木(statement)、表达式积木(value)、业务积木(statement 自定义)。
|
|
43
|
-
|
|
44
|
-
### 3.1 流程控制积木
|
|
45
|
-
|
|
46
|
-
| Blockly 积木 | workflow 映射 | 落地方式 |
|
|
47
|
-
|---|---|---|
|
|
48
|
-
| 顺序拼接 | `flows` 依次连接 | 每个积木一个节点,`next` 生成下一条边 |
|
|
49
|
-
| `controls_if`(含 else/elseif) | `exclusive_gateway` + 条件边 | 网关 `condition` 三元组,`else` 作 `is_default` 出口 |
|
|
50
|
-
| `controls_repeat` / `controls_while` | `looper/loop`(for/while) | `_jump_to` 回跳循环起点,body 作子节点链 |
|
|
51
|
-
| `controls_forEach` | `looper/loop`(foreach) | `items` + `index` 迭代 |
|
|
52
|
-
| `controls_flow_statements`(break/continue) | `looper/loop`(break/continue) | `break_target` / `loop_label` 回跳 |
|
|
53
|
-
| 子流程调用 | `subprocess` 节点 | `dispatcher/subflow` |
|
|
54
|
-
|
|
55
|
-
### 3.2 表达式积木
|
|
56
|
-
|
|
57
|
-
| Blockly 积木 | 映射策略 | 说明 |
|
|
58
|
-
|---|---|---|
|
|
59
|
-
| `math_number` / `math_arithmetic` / `math_single` | 路径A:扁平化为 `calculator/formula` 节点 | expression 生成 JS 算式,嵌套子表达式先算为中间变量(见第 5 节) |
|
|
60
|
-
| `logic_compare` / `logic_operation` | 提取为网关条件或 formula | 单条件转网关,复合条件转 formula 或条件链 |
|
|
61
|
-
| `variables_get` | `{{ $input.x }}` / `{{ $steps.id.result }}` | 单变量引用,保留原始类型 |
|
|
62
|
-
| `variables_set` | `manager/variables`(set) | 运行时变量 |
|
|
63
|
-
| `text_*` 系列 | `renderer/template` / `converter/*` | 模板插值 |
|
|
64
|
-
|
|
65
|
-
### 3.3 业务积木
|
|
66
|
-
|
|
67
|
-
每个 `operator/handler` 对应一个积木,从模块描述 JSON 自动生成,示例:
|
|
68
|
-
|
|
69
|
-
- `manager/mysql_rw`(查询)→ 积木名 `mm_database_query`
|
|
70
|
-
- `executor/http` → 积木名 `mm_http`
|
|
71
|
-
- `validator/params` → 积木名 `mm_validate`
|
|
72
|
-
|
|
73
|
-
## 4. 积木定义自动生成规则
|
|
74
|
-
|
|
75
|
-
以模块描述 JSON(如 `common/mod/dispatcher/condition/dispatcher.json`)的 `params.properties` 为 schema 源,逐字段映射 Blockly 输入类型:
|
|
76
|
-
|
|
77
|
-
| JSON schema 字段 | Blockly 输入 | 说明 |
|
|
78
|
-
|---|---|---|
|
|
79
|
-
| `type: string` + `enum` | `field_dropdown` | 枚举下拉 |
|
|
80
|
-
| `type: string` | `field_input` | 文本,可填 `{{ }}` 模板 |
|
|
81
|
-
| `type: number` | `field_number` | 数值 |
|
|
82
|
-
| `type: boolean` | `field_dropdown`(true/false) | 布尔 |
|
|
83
|
-
| `type: object` | 嵌套 `input_value` | 递归子积木 |
|
|
84
|
-
| 非 `required` 字段 | 可选输入(shadow 填充默认值) | `default` 兜底 |
|
|
85
|
-
|
|
86
|
-
产物:
|
|
87
|
-
|
|
88
|
-
- `block_defs`:Blockly JSON 格式积木定义(`args0` / `message0` / `output` / `colour`)
|
|
89
|
-
- `toolbox`:按模块 `group` 字段分组,或按 operator 分类
|
|
90
|
-
|
|
91
|
-
反向字段映射:`returns.properties` 描述积木输出值,用于 `$steps.<id>.result.<field>` 引用提示。
|
|
92
|
-
|
|
93
|
-
## 5. 表达式语义处理
|
|
94
|
-
|
|
95
|
-
**问题**:嵌套表达式积木(如 `(a + b) * c > 10 && flag`)是树形结构,而 `params` 值目前只接受字符串模板,且引擎限制整个参数值恰为 `{{ }}` 时按单变量引用处理(见 `workflow_engine.js` 的 `_resolveVars`)。
|
|
96
|
-
|
|
97
|
-
**路径A(推荐,零引擎改动)**:嵌套展开为"中间变量 + formula"链。
|
|
98
|
-
|
|
99
|
-
Blockly 表达式 `(a + b) * c` 生成两个节点:
|
|
100
|
-
|
|
101
|
-
```json
|
|
102
|
-
{
|
|
103
|
-
"id": "calc_inner",
|
|
104
|
-
"operator": "calculator",
|
|
105
|
-
"handler": "formula",
|
|
106
|
-
"params": {
|
|
107
|
-
"expression": "a + b",
|
|
108
|
-
"variables": { "a": "{{ $input.a }}", "b": "{{ $input.b }}" }
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"id": "calc_total",
|
|
113
|
-
"operator": "calculator",
|
|
114
|
-
"handler": "formula",
|
|
115
|
-
"params": {
|
|
116
|
-
"expression": "inner * c",
|
|
117
|
-
"variables": { "inner": "{{ $steps.calc_inner.result }}", "c": "{{ $input.c }}" }
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
`formula` 天然支持 `expression + variables` 且变量值可模板插值,现有引擎可直接执行。
|
|
123
|
-
|
|
124
|
-
**路径B(已实现)**:`params` 支持 `{ $expr: '表达式' }` 对象字段,引擎 `_resolveVars` 识别后经受限 Function 求值并**保持原始类型**,失败时回退模板渲染。适用于复杂嵌套表达式(逻辑与/或、多条件组合)在 Blockly 积木中直接表达的场景。
|
|
125
|
-
|
|
126
|
-
## 6. 转换器设计
|
|
127
|
-
|
|
128
|
-
### 6.1 类结构
|
|
129
|
-
|
|
130
|
-
| 文件 | 类 | 职责 |
|
|
131
|
-
|---|---|---|
|
|
132
|
-
| `kernel/blockly_defs.js`(新增) | `BlocklyDefs` | 扫描 `common/mod` 描述文件,生成积木定义与 toolbox |
|
|
133
|
-
| `kernel/blockly_converter.js`(新增) | `BlocklyConverter` | `toWorkflow` / `toBlockly` 双向转换 |
|
|
134
|
-
|
|
135
|
-
### 6.2 BlocklyConverter 方法
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
toWorkflow(blockly_json, options) → { workflow, warnings } [已实现]
|
|
139
|
-
- 遍历顶层语句块 next 链
|
|
140
|
-
- 生成节点 id:积木类型 snake_case + 序号,保证全局唯一
|
|
141
|
-
- controls_if 转网关条件边;循环转 looper/loop + _jump_to
|
|
142
|
-
- 表达式展开为 formula 链(路径A)
|
|
143
|
-
- 组装 nodes + flows + input_schema(从 variables_get 推断)
|
|
144
|
-
- 自动补全 start/end_event 边界事件
|
|
145
|
-
|
|
146
|
-
toBlockly(workflow) → { blocks, warnings } [已实现]
|
|
147
|
-
- _toModel: BPMN 模式直接使用,steps 模式经 BpmnMapper.toBpmn 转换
|
|
148
|
-
- _buildChain: 从 start_event 沿图构建积木链,next 串接
|
|
149
|
-
- _buildIf/_findJoin: 网关还原为 controls_if,自动检测分支汇合点
|
|
150
|
-
- _conditionToBlock: 条件还原为 logic_compare/logic_boolean
|
|
151
|
-
- _valueToBlock: {{ $input.x }} 还原为 variables_get,数字/布尔还原
|
|
152
|
-
- _nodeToBlock: 任务节点转 mm_<operator>_<handler> 积木,params 进 fields
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
方法命名遵循项目规范:小驼峰,私有方法以下划线开头。
|
|
156
|
-
|
|
157
|
-
## 7. 示例
|
|
158
|
-
|
|
159
|
-
积木逻辑:"若数量 >= 1,则计算总价并记录日志"。
|
|
160
|
-
|
|
161
|
-
生成的 workflow.json:
|
|
162
|
-
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"name": "mm_blockly_demo",
|
|
166
|
-
"nodes": [
|
|
167
|
-
{ "id": "start", "type": "start_event", "name": "开始" },
|
|
168
|
-
{ "id": "gate_qty", "type": "exclusive_gateway", "name": "数量校验" },
|
|
169
|
-
{ "id": "calc_total", "type": "task", "operator": "calculator", "handler": "formula",
|
|
170
|
-
"params": { "expression": "price * qty",
|
|
171
|
-
"variables": { "price": "{{ $input.price }}", "qty": "{{ $input.quantity }}" } } },
|
|
172
|
-
{ "id": "log", "type": "task", "operator": "observer", "handler": "log_watch",
|
|
173
|
-
"params": { "level": "info", "message": "总价={{ $steps.calc_total.result }}" } },
|
|
174
|
-
{ "id": "end", "type": "end_event", "name": "结束" }
|
|
175
|
-
],
|
|
176
|
-
"flows": [
|
|
177
|
-
{ "id": "f1", "from": "start", "to": "gate_qty" },
|
|
178
|
-
{ "id": "f2", "from": "gate_qty", "to": "calc_total", "condition": "$input.quantity >= 1" },
|
|
179
|
-
{ "id": "f3", "from": "gate_qty", "to": "end", "condition": "else" },
|
|
180
|
-
{ "id": "f4", "from": "calc_total", "to": "log" },
|
|
181
|
-
{ "id": "f5", "from": "log", "to": "end" }
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
该文件可直接经 `normalizeWorkflow` 归一化为 steps 执行,条件字符串解析逻辑在 `bpmn_parser.js` 的 `_normalizeCondition` 已支持。
|
|
187
|
-
|
|
188
|
-
## 8. 落地顺序与状态
|
|
189
|
-
|
|
190
|
-
| 步骤 | 内容 | 状态 |
|
|
191
|
-
|---|---|---|
|
|
192
|
-
| 1 | 实现 `blockly_converter.js`(正向 `toWorkflow`,覆盖顺序/if/formula/log),用现有引擎跑通示例 | ✅ 已完成 |
|
|
193
|
-
| 2 | 实现 `blockly_defs.js`,从模块描述生成积木定义与 toolbox | ✅ 已完成 |
|
|
194
|
-
| 3 | 实现反向 `toBlockly`,让已有 workflow.json 能渲染回画布 | ✅ 已完成 |
|
|
195
|
-
| 4 | 实现路径B:引擎 `$expr` 表达式求值增强 | ✅ 已完成 |
|
|
196
|
-
|
|
197
|
-
实现说明:
|
|
198
|
-
|
|
199
|
-
- 积木定义生成 191 个,类型约定 `mm_<operator>_<handler>`,与转换器保持一致
|
|
200
|
-
- 测试用例 18 项全部通过,含引擎端到端执行验证
|
|
201
|
-
- 真实工作流 `example/common/workflow/order/create_bpmn.json` 反向还原成功
|
|
202
|
-
- 引擎 `workflow_engine.js` 仅增加 `$expr` 表达式求值(`_evalExpr`/`_buildTplData`),原有行为不变
|
|
203
|
-
|
|
204
|
-
## 9. 涉及文件清单
|
|
205
|
-
|
|
206
|
-
| 文件 | 变更 | 状态 |
|
|
207
|
-
|---|---|---|
|
|
208
|
-
| `kernel/blockly_converter.js` | 双向转换器(toWorkflow/toBlockly),含 `$expr` 表达式编译 | 新增 ✅ |
|
|
209
|
-
| `kernel/blockly_defs.js` | 积木定义生成器 | 新增 ✅ |
|
|
210
|
-
| `test/blockly_converter.test.js` | 转换器测试(正向/反向/逻辑组合/引擎执行) | 新增 ✅ |
|
|
211
|
-
| `test/blockly_defs.test.js` | 积木库生成测试 | 新增 ✅ |
|
|
212
|
-
| `kernel/workflow_engine.js` | 新增 `$expr` 表达式求值(`_evalExpr`/`_buildTplData`) | 改动 ✅ |
|
|
213
|
-
| `docs/Blockly映射方案.md` | 本文档 | 更新 ✅ |
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# LLM 集成指南
|
|
2
|
-
|
|
3
|
-
## 获取模块目录(喂给 LLM 作为 system prompt)
|
|
4
|
-
|
|
5
|
-
```javascript
|
|
6
|
-
const catalog = kernel.getModuleCatalog();
|
|
7
|
-
// → { operators: [{ name, title, description, handlers: [{ name, params, returns, ... }] }] }
|
|
8
|
-
```
|
|
9
|
-
|
|
10
|
-
## 获取工作流目录
|
|
11
|
-
|
|
12
|
-
```javascript
|
|
13
|
-
const workflow = kernel.getWorkflowCatalog();
|
|
14
|
-
// → { workflow: [{ group, name, title, description, input_schema, output_schema }] }
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## System Prompt 示例
|
|
18
|
-
|
|
19
|
-
```
|
|
20
|
-
你是一个工作流生成器。可用的模块如下:
|
|
21
|
-
|
|
22
|
-
{JSON.stringify(kernel.getModuleCatalog(), null, 2)}
|
|
23
|
-
|
|
24
|
-
根据用户需求,生成 workflow JSON。要求:
|
|
25
|
-
1. 设置 input_schema/output_schema
|
|
26
|
-
2. 每个 step 设置 id
|
|
27
|
-
3. 步骤间用 $steps.id.field 命名引用
|
|
28
|
-
4. 对可能失败的步骤设置 on_error
|
|
29
|
-
```
|