agentworkshop 0.2.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/app/plugins/aw-plugins.client.ts +79 -0
  2. package/cli/commands/plugin.mjs +169 -0
  3. package/cli/commands/update.mjs +12 -4
  4. package/docs/plugins.md +127 -0
  5. package/package.json +19 -2
  6. package/scripts/dev-guard.mjs +13 -0
  7. package/scripts/home-bootstrap.mjs +25 -1
  8. package/sdk/api.mjs +101 -0
  9. package/sdk/client.mjs +120 -0
  10. package/sdk/context.mjs +219 -0
  11. package/sdk/examples/sample-insight/client.mjs +23 -0
  12. package/sdk/examples/sample-insight/index.mjs +39 -0
  13. package/sdk/hooks.mjs +103 -0
  14. package/sdk/index.d.mts +135 -0
  15. package/sdk/index.mjs +41 -0
  16. package/sdk/lifecycle.mjs +25 -0
  17. package/server/api/plugins/[name]/[...path].ts +22 -0
  18. package/server/api/plugins/client/[name].get.ts +18 -0
  19. package/server/api/plugins/manifest.get.ts +10 -0
  20. package/server/api/workshop/dcw/lines/[id]/start.post.ts +2 -0
  21. package/server/api/workshop/dcw/lines/[id]/stop.post.ts +2 -0
  22. package/server/data/daqs.json +347 -61
  23. package/server/data/dcw-lines.json +91 -0
  24. package/server/data/dcw-products.json +77 -0
  25. package/server/data/dcw-recipes.json +220 -0
  26. package/server/data/dcw-rollback.json +1 -1
  27. package/server/data/dcw-runs.json +275 -198
  28. package/server/data/dcws.json +231 -0
  29. package/server/data/line-runs.json +74 -14
  30. package/server/plugins/aw-plugins.ts +24 -0
  31. package/server/services/workshop/daq/daq-controller.ts +6 -2
  32. package/server/services/workshop/dcw/dcw-controller.ts +3 -0
  33. package/server/services/workshop/plugins/host.mjs +289 -0
  34. package/server/services/workshop/scene-events.ts +3 -0
@@ -1,202 +1,4 @@
1
1
  [
2
- {
3
- "id": "rr-77052bf8",
4
- "recipeId": "rc-8c99f08c",
5
- "recipeName": "线审计配方",
6
- "productId": "pd-f7e92f0d",
7
- "lineId": "ln-4163b163",
8
- "startedAt": "2026-08-29T14:48:03.323Z",
9
- "endedAt": "2026-08-29T14:48:07.042Z",
10
- "results": [
11
- {
12
- "templateRef": "dcw-cw-52d5c9ef",
13
- "nodeId": "dw-5e63b6aa",
14
- "ok": true,
15
- "message": "Mock PLC 写入成功:45 → raw 45,回读一致(标定后物理值 45)",
16
- "value": 45
17
- }
18
- ]
19
- },
20
- {
21
- "id": "rr-1cfa407d",
22
- "recipeId": "rc-2cda129f",
23
- "recipeName": "作业流审计配方",
24
- "productId": "pd-783824dc",
25
- "lineId": "ln-4fbbc6e5",
26
- "startedAt": "2026-08-29T14:48:41.611Z",
27
- "endedAt": "2026-08-29T14:48:47.087Z",
28
- "results": [
29
- {
30
- "templateRef": "dcw-temp-sp",
31
- "nodeId": "dw-c72cc3d8",
32
- "ok": true,
33
- "message": "Mock PLC 写入成功:180 → raw 180,回读一致(标定后物理值 180)",
34
- "value": 180
35
- }
36
- ]
37
- },
38
- {
39
- "id": "rr-3438a315",
40
- "recipeId": "rc-e346d225",
41
- "recipeName": "作业流审计配方",
42
- "productId": "pd-b51d0098",
43
- "lineId": "ln-0b846303",
44
- "startedAt": "2026-08-29T14:49:23.297Z",
45
- "endedAt": "2026-08-29T14:49:28.771Z",
46
- "results": [
47
- {
48
- "templateRef": "dcw-temp-sp",
49
- "nodeId": "dw-bc6b2e04",
50
- "ok": true,
51
- "message": "Mock PLC 写入成功:180 → raw 180,回读一致(标定后物理值 180)",
52
- "value": 180
53
- }
54
- ]
55
- },
56
- {
57
- "id": "rr-89fecc12",
58
- "recipeId": "rc-4e563100",
59
- "recipeName": "控制终审X线配方",
60
- "productId": "pd-999336c2",
61
- "lineId": "ln-b758b74e",
62
- "startedAt": "2026-08-29T14:59:09.163Z",
63
- "endedAt": "2026-08-29T14:59:16.232Z",
64
- "results": [
65
- {
66
- "templateRef": "dcw-temp-sp",
67
- "nodeId": "dw-65e7c7da",
68
- "ok": true,
69
- "message": "Mock PLC 写入成功:180 → raw 180,回读一致(标定后物理值 180)",
70
- "value": 180
71
- }
72
- ]
73
- },
74
- {
75
- "id": "rr-845ec7a7",
76
- "recipeId": "rc-075136a0",
77
- "recipeName": "控制终审Y线配方",
78
- "productId": "pd-6ba2e8da",
79
- "lineId": "ln-6cd8918a",
80
- "startedAt": "2026-08-29T14:59:13.576Z",
81
- "endedAt": "2026-08-29T14:59:18.388Z",
82
- "results": [
83
- {
84
- "templateRef": "dcw-temp-sp",
85
- "nodeId": "dw-01418312",
86
- "ok": true,
87
- "message": "Mock PLC 写入成功:165 → raw 165,回读一致(标定后物理值 165)",
88
- "value": 165
89
- }
90
- ]
91
- },
92
- {
93
- "id": "rr-aa12ae5e",
94
- "recipeId": "rc-246373dd",
95
- "recipeName": "场景配方A",
96
- "productId": "pd-e633ba38",
97
- "lineId": "ln-0ba52df1",
98
- "startedAt": "2026-08-29T15:02:33.640Z",
99
- "endedAt": "2026-08-29T15:02:39.216Z",
100
- "results": [
101
- {
102
- "templateRef": "dcw-temp-sp",
103
- "nodeId": "dw-f4a529b4",
104
- "ok": true,
105
- "message": "Mock PLC 写入成功:180 → raw 180,回读一致(标定后物理值 180)",
106
- "value": 180
107
- }
108
- ]
109
- },
110
- {
111
- "id": "rr-786703d9",
112
- "recipeId": "rc-4a67b742",
113
- "recipeName": "场景配方B",
114
- "productId": "pd-69813458",
115
- "lineId": "ln-83ff8f7f",
116
- "startedAt": "2026-08-29T15:02:39.238Z",
117
- "endedAt": "2026-08-29T15:03:12.440Z",
118
- "results": [
119
- {
120
- "templateRef": "dcw-temp-sp",
121
- "nodeId": "dw-6501c76b",
122
- "ok": true,
123
- "message": "Mock PLC 写入成功:165 → raw 165,回读一致(标定后物理值 165)",
124
- "value": 165
125
- }
126
- ]
127
- },
128
- {
129
- "id": "rr-16b92045",
130
- "recipeId": "rc-d7722fe2",
131
- "recipeName": "终审配方A",
132
- "productId": "pd-1f95918f",
133
- "lineId": "ln-8b9ad64f",
134
- "startedAt": "2026-08-29T15:03:12.949Z",
135
- "endedAt": "2026-08-29T15:03:30.421Z",
136
- "results": [
137
- {
138
- "templateRef": "dcw-temp-sp",
139
- "nodeId": "dw-26fcdd21",
140
- "ok": true,
141
- "message": "写入并回读一致:182 → raw 1280,回读 182(标定后物理值 182)",
142
- "value": 182
143
- }
144
- ]
145
- },
146
- {
147
- "id": "rr-0c07ae7e",
148
- "recipeId": "rc-c27cc031",
149
- "recipeName": "作业流审计配方",
150
- "productId": "pd-36cd3a1f",
151
- "lineId": "ln-1cb2b50e",
152
- "startedAt": "2026-08-29T15:03:30.794Z",
153
- "endedAt": "2026-08-29T15:03:36.261Z",
154
- "results": [
155
- {
156
- "templateRef": "dcw-temp-sp",
157
- "nodeId": "dw-eba5d3d2",
158
- "ok": true,
159
- "message": "Mock PLC 写入成功:180 → raw 180,回读一致(标定后物理值 180)",
160
- "value": 180
161
- }
162
- ]
163
- },
164
- {
165
- "id": "rr-448a5bc3",
166
- "recipeId": "rc-37951baf",
167
- "recipeName": "终审配方A",
168
- "productId": "pd-68638695",
169
- "lineId": "ln-9c2a9e77",
170
- "startedAt": "2026-08-29T15:04:06.371Z",
171
- "endedAt": "2026-08-29T15:04:22.886Z",
172
- "results": [
173
- {
174
- "templateRef": "dcw-temp-sp",
175
- "nodeId": "dw-1a399fea",
176
- "ok": true,
177
- "message": "写入并回读一致:182 → raw 1280,回读 182(标定后物理值 182)",
178
- "value": 182
179
- }
180
- ]
181
- },
182
- {
183
- "id": "rr-092df05b",
184
- "recipeId": "rc-0a65f360",
185
- "recipeName": "终审配方A",
186
- "productId": "pd-e0b6b509",
187
- "lineId": "ln-327bc579",
188
- "startedAt": "2026-08-29T15:05:28.249Z",
189
- "endedAt": "2026-08-29T15:05:45.829Z",
190
- "results": [
191
- {
192
- "templateRef": "dcw-temp-sp",
193
- "nodeId": "dw-1194826a",
194
- "ok": true,
195
- "message": "写入并回读一致:182 → raw 1280,回读 182(标定后物理值 182)",
196
- "value": 182
197
- }
198
- ]
199
- },
200
2
  {
201
3
  "id": "rr-127c6247",
202
4
  "recipeId": "rc-28c5aeb8",
@@ -4629,5 +4431,280 @@
4629
4431
  "max": 1
4630
4432
  }
4631
4433
  ]
4434
+ },
4435
+ {
4436
+ "id": "rr-391f84af",
4437
+ "recipeId": "rc-a8d2da01",
4438
+ "recipeName": "配方-mtjjgw4u",
4439
+ "productId": "pd-b2d5d46d",
4440
+ "lineId": "ln-6e75316a",
4441
+ "startedAt": "2026-09-02T03:30:56.209Z",
4442
+ "endedAt": "2026-09-02T03:31:13.401Z",
4443
+ "results": [
4444
+ {
4445
+ "templateRef": "temp-sp",
4446
+ "nodeId": "dw-be292513",
4447
+ "ok": false,
4448
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4449
+ "value": 120
4450
+ }
4451
+ ],
4452
+ "paramsSnapshot": [
4453
+ {
4454
+ "nodeId": "dw-be292513",
4455
+ "templateRef": "temp-sp",
4456
+ "value": 120
4457
+ }
4458
+ ]
4459
+ },
4460
+ {
4461
+ "id": "rr-b1e3982b",
4462
+ "recipeId": "rc-3bc18ab7",
4463
+ "recipeName": "配方-mtjjl440",
4464
+ "productId": "pd-2908dea4",
4465
+ "lineId": "ln-e2d8aebc",
4466
+ "startedAt": "2026-09-02T03:34:13.182Z",
4467
+ "endedAt": "2026-09-02T03:34:19.458Z",
4468
+ "results": [
4469
+ {
4470
+ "templateRef": "temp-sp",
4471
+ "nodeId": "dw-488fdd91",
4472
+ "ok": false,
4473
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4474
+ "value": 120
4475
+ }
4476
+ ],
4477
+ "paramsSnapshot": [
4478
+ {
4479
+ "nodeId": "dw-488fdd91",
4480
+ "templateRef": "temp-sp",
4481
+ "value": 120
4482
+ }
4483
+ ]
4484
+ },
4485
+ {
4486
+ "id": "rr-f5ae10ae",
4487
+ "recipeId": "rc-114d80a5",
4488
+ "recipeName": "配方-mtjjodq2",
4489
+ "productId": "pd-0629a23a",
4490
+ "lineId": "ln-4849768e",
4491
+ "startedAt": "2026-09-02T03:36:45.583Z",
4492
+ "endedAt": "2026-09-02T03:36:50.665Z",
4493
+ "results": [
4494
+ {
4495
+ "templateRef": "temp-sp",
4496
+ "nodeId": "dw-b98f94d2",
4497
+ "ok": false,
4498
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4499
+ "value": 120
4500
+ }
4501
+ ],
4502
+ "paramsSnapshot": [
4503
+ {
4504
+ "nodeId": "dw-b98f94d2",
4505
+ "templateRef": "temp-sp",
4506
+ "value": 120
4507
+ }
4508
+ ]
4509
+ },
4510
+ {
4511
+ "id": "rr-bbba6181",
4512
+ "recipeId": "rc-5e7b8b10",
4513
+ "recipeName": "配方-mtjjs78h",
4514
+ "productId": "pd-83e974b9",
4515
+ "lineId": "ln-e0769d5b",
4516
+ "startedAt": "2026-09-02T03:39:43.842Z",
4517
+ "endedAt": "2026-09-02T03:39:50.185Z",
4518
+ "results": [
4519
+ {
4520
+ "templateRef": "temp-sp",
4521
+ "nodeId": "dw-093215e8",
4522
+ "ok": false,
4523
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4524
+ "value": 120
4525
+ }
4526
+ ],
4527
+ "paramsSnapshot": [
4528
+ {
4529
+ "nodeId": "dw-093215e8",
4530
+ "templateRef": "temp-sp",
4531
+ "value": 120
4532
+ }
4533
+ ]
4534
+ },
4535
+ {
4536
+ "id": "rr-8107a4c4",
4537
+ "recipeId": "rc-7c7d2862",
4538
+ "recipeName": "配方-mtjjvde2",
4539
+ "productId": "pd-0a982f6c",
4540
+ "lineId": "ln-8c17f4e7",
4541
+ "startedAt": "2026-09-02T03:42:11.738Z",
4542
+ "endedAt": "2026-09-02T03:42:17.988Z",
4543
+ "results": [
4544
+ {
4545
+ "templateRef": "temp-sp",
4546
+ "nodeId": "dw-4b8064da",
4547
+ "ok": false,
4548
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4549
+ "value": 120
4550
+ }
4551
+ ],
4552
+ "paramsSnapshot": [
4553
+ {
4554
+ "nodeId": "dw-4b8064da",
4555
+ "templateRef": "temp-sp",
4556
+ "value": 120
4557
+ }
4558
+ ]
4559
+ },
4560
+ {
4561
+ "id": "rr-4e0a115f",
4562
+ "recipeId": "rc-8a60518e",
4563
+ "recipeName": "哨兵配方-mtjku36w",
4564
+ "productId": "pd-4b71be77",
4565
+ "lineId": "ln-0eccf6ba",
4566
+ "startedAt": "2026-09-02T04:09:11.482Z",
4567
+ "endedAt": null,
4568
+ "results": [
4569
+ {
4570
+ "templateRef": "temp-sp",
4571
+ "nodeId": "dw-3c7b50c0",
4572
+ "ok": false,
4573
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4574
+ "value": 120
4575
+ }
4576
+ ],
4577
+ "paramsSnapshot": [
4578
+ {
4579
+ "nodeId": "dw-3c7b50c0",
4580
+ "templateRef": "temp-sp",
4581
+ "value": 120
4582
+ }
4583
+ ]
4584
+ },
4585
+ {
4586
+ "id": "rr-39b3edda",
4587
+ "recipeId": "rc-70f39a03",
4588
+ "recipeName": "配方C-mtjkwyhu",
4589
+ "productId": "pd-bb1e0bed",
4590
+ "lineId": "ln-e984246e",
4591
+ "startedAt": "2026-09-02T04:11:26.583Z",
4592
+ "endedAt": null,
4593
+ "results": [
4594
+ {
4595
+ "templateRef": "temp-sp",
4596
+ "nodeId": "dw-ce326742",
4597
+ "ok": false,
4598
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4599
+ "value": 120
4600
+ }
4601
+ ],
4602
+ "paramsSnapshot": [
4603
+ {
4604
+ "nodeId": "dw-ce326742",
4605
+ "templateRef": "temp-sp",
4606
+ "value": 120
4607
+ }
4608
+ ]
4609
+ },
4610
+ {
4611
+ "id": "rr-2baf5f34",
4612
+ "recipeId": "rc-25081a45",
4613
+ "recipeName": "配方D-mtjkzcfr",
4614
+ "productId": "pd-9f2d9507",
4615
+ "lineId": "ln-1fe0b5bc",
4616
+ "startedAt": "2026-09-02T04:13:17.902Z",
4617
+ "endedAt": null,
4618
+ "results": [
4619
+ {
4620
+ "templateRef": "temp-sp",
4621
+ "nodeId": "dw-9b40d8d6",
4622
+ "ok": false,
4623
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4624
+ "value": 120
4625
+ }
4626
+ ],
4627
+ "paramsSnapshot": [
4628
+ {
4629
+ "nodeId": "dw-9b40d8d6",
4630
+ "templateRef": "temp-sp",
4631
+ "value": 120
4632
+ }
4633
+ ]
4634
+ },
4635
+ {
4636
+ "id": "rr-7585cef0",
4637
+ "recipeId": "rc-3ebd1a97",
4638
+ "recipeName": "配方E-mtjl43pv",
4639
+ "productId": "pd-d230255e",
4640
+ "lineId": "ln-d826473e",
4641
+ "startedAt": "2026-09-02T04:16:59.891Z",
4642
+ "endedAt": null,
4643
+ "results": [
4644
+ {
4645
+ "templateRef": "temp-sp",
4646
+ "nodeId": "dw-1596b290",
4647
+ "ok": false,
4648
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4649
+ "value": 120
4650
+ }
4651
+ ],
4652
+ "paramsSnapshot": [
4653
+ {
4654
+ "nodeId": "dw-1596b290",
4655
+ "templateRef": "temp-sp",
4656
+ "value": 120
4657
+ }
4658
+ ]
4659
+ },
4660
+ {
4661
+ "id": "rr-d8002452",
4662
+ "recipeId": "rc-fce9474f",
4663
+ "recipeName": "配方F-mtjl60qf",
4664
+ "productId": "pd-6065b4ba",
4665
+ "lineId": "ln-156abb71",
4666
+ "startedAt": "2026-09-02T04:18:29.340Z",
4667
+ "endedAt": null,
4668
+ "results": [
4669
+ {
4670
+ "templateRef": "temp-sp",
4671
+ "nodeId": "dw-9e3a958a",
4672
+ "ok": false,
4673
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4674
+ "value": 120
4675
+ }
4676
+ ],
4677
+ "paramsSnapshot": [
4678
+ {
4679
+ "nodeId": "dw-9e3a958a",
4680
+ "templateRef": "temp-sp",
4681
+ "value": 120
4682
+ }
4683
+ ]
4684
+ },
4685
+ {
4686
+ "id": "rr-7f4a6ac0",
4687
+ "recipeId": "rc-e27a0673",
4688
+ "recipeName": "配方G-mtjl98nl",
4689
+ "productId": "pd-52f54e33",
4690
+ "lineId": "ln-bac43927",
4691
+ "startedAt": "2026-09-02T04:20:59.682Z",
4692
+ "endedAt": null,
4693
+ "results": [
4694
+ {
4695
+ "templateRef": "temp-sp",
4696
+ "nodeId": "dw-a2e1ca20",
4697
+ "ok": false,
4698
+ "message": "设定值 120℃ 越出工艺安全量程 [150, 200] ℃",
4699
+ "value": 120
4700
+ }
4701
+ ],
4702
+ "paramsSnapshot": [
4703
+ {
4704
+ "nodeId": "dw-a2e1ca20",
4705
+ "templateRef": "temp-sp",
4706
+ "value": 120
4707
+ }
4708
+ ]
4632
4709
  }
4633
4710
  ]