agentworkshop 0.7.7 → 0.7.8
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/.AgentWorkShop/prompts/host-tools.json +1 -1
- package/.output/.AgentWorkShop/prompts/host-tools.json +1 -1
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{CQiKcuoG.js → Dc46i75T.js} +3 -3
- package/.output/public/_nuxt/R_Wv_Nd9.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/e5bb1803-86d9-43b3-85be-dc787dc9a978.json +1 -0
- package/.output/public/_nuxt/{entry.DvlXlPwx.css → entry.5qf6EqfN.css} +1 -1
- package/.output/public/_nuxt/workshop.3kAcLB_M.css +1 -0
- package/.output/server/chunks/_/nitro.mjs +2468 -2407
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/build/TownView-B5KifIaT.mjs +1 -1
- package/.output/server/chunks/build/_id_-C-ewLgfl.mjs +1 -1
- package/.output/server/chunks/build/_id_-Ct4Jhvl1.mjs +1 -1
- package/.output/server/chunks/build/daq-D9RA_uze.mjs +1 -1
- package/.output/server/chunks/build/dcw-BTM5YU-B.mjs +1 -1
- package/.output/server/chunks/build/useDaqStream-hwkhJHFU.mjs +1 -1
- package/.output/server/chunks/build/useDcwStream-Bdew_yrr.mjs +1 -1
- package/.output/server/chunks/build/{workshop-iCzNRifn.mjs → workshop-D5CQj2A8.mjs} +45 -39
- package/.output/server/chunks/build/workshop-D5CQj2A8.mjs.map +1 -0
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs +25 -0
- package/.output/server/chunks/routes/api/users/setup-status.get.mjs.map +1 -0
- package/.output/server/chunks/routes/api/workshop/caller.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channel-templates/_id/instantiate.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/channels.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs +3 -2
- package/.output/server/chunks/routes/api/workshop/daq/_id/samples.get.mjs.map +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra/reconnect.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/infra.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/daq/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/bind.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/param-ledger.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/read.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/test.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id/write.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/controller.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index2.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index3.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/journal/node/_nodeId/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/line/query.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/start.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id/stop.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/lines/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/judge.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id/series.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/optimizations/_id_.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/products/_id_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/apply.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/mark-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/recipes/_id/rollback-good.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/close.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/data.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/runs/_id/rollback.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/templates/_key_.patch.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/dcw/test-driver.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/device-twins/_id_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses/_id/providers.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/harnesses.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/pending.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/hitl/respond.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index4.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index5.get.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/index6.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/disable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/plugins/_name/enable.post.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.delete.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/scene/layouts/_channelId_.put.mjs +1 -1
- package/.output/server/chunks/routes/api/workshop/workspaces/_id/channel-templates/_tplId_.post.mjs +1 -1
- package/.output/server/chunks/routes/renderer.mjs +2 -2
- package/.output/server/chunks/virtual/entry.mjs +10 -2
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +27 -7
- package/README.md +455 -435
- package/app/pages/workshop/index.vue +25 -6
- package/config.yml +11 -1
- package/i18n/dicts/settings.json +4 -0
- package/i18n/locales/en.ts +4 -0
- package/i18n/locales/zh-CN.ts +4 -0
- package/package.json +1 -1
- package/scripts/_dbg-codex-handshake.ts +30 -0
- package/scripts/_dbg-codex-sandbox.ts +58 -0
- package/scripts/_dbg-codex-turn.ts +65 -0
- package/scripts/_dbg-interval-config.mjs +145 -0
- package/scripts/_dbg-setup-e2e.mjs +88 -0
- package/scripts/e2e-harness-provider-task.mjs +126 -0
- package/server/api/users/setup-status.get.ts +8 -0
- package/server/api/workshop/daq/[id]/samples.get.ts +4 -2
- package/server/data/daqs.json +97 -45
- package/server/data/dcw-lines.json +7 -0
- package/server/data/dcw-products.json +21 -0
- package/server/data/dcw-recipes.json +84 -0
- package/server/data/dcw-rollback.json +39 -6
- package/server/data/dcw-runs.json +81 -75
- package/server/data/dcw-writes.json +36 -0
- package/server/data/dcws.json +374 -299
- package/server/data/line-runs.json +6 -6
- package/server/plugins/security.ts +46 -50
- package/server/repositories/user.repository.ts +384 -414
- package/server/services/system-config.ts +2 -0
- package/server/services/user.service.ts +8 -3
- package/server/services/workshop/agents/adapters/line-spawn.ts +6 -3
- package/server/services/workshop/agents/host-tool-bridge.ts +21 -1
- package/server/services/workshop/agents/industrial-tools.ts +5 -3
- package/server/services/workshop/daq/daq-controller.ts +34 -6
- package/server/services/workshop/daq/daq-node.ts +3 -3
- package/server/services/workshop/daq/daq-runtime.ts +4 -3
- package/server/services/workshop/dcw/dcw-controller.ts +4 -2
- package/server/services/workshop/settings.ts +23 -0
- package/shared/config/schema.json +4 -0
- package/.output/public/_nuxt/C-GarxYC.js +0 -1
- package/.output/public/_nuxt/builds/meta/14df171d-89cb-43ec-ad6f-9df72d6da7f5.json +0 -1
- package/.output/public/_nuxt/workshop.B98sHiJq.css +0 -1
- package/.output/server/chunks/build/workshop-iCzNRifn.mjs.map +0 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"productId": "pd-6348a595",
|
|
8
8
|
"productName": "0.8mm 光学膜",
|
|
9
9
|
"startedAt": "2026-09-03T11:18:01.213Z",
|
|
10
|
-
"taggedSamples":
|
|
10
|
+
"taggedSamples": 40180
|
|
11
11
|
},
|
|
12
12
|
{
|
|
13
13
|
"lineId": "ln-9a60a0cd",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"productId": "pd-db432902",
|
|
58
58
|
"productName": "探针产品",
|
|
59
59
|
"startedAt": "2026-09-04T05:08:10.103Z",
|
|
60
|
-
"taggedSamples":
|
|
60
|
+
"taggedSamples": 11354
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"lineId": "ln-6a34fbc7",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"productId": "pd-10cfc2b3",
|
|
68
68
|
"productName": "全协议产品-mtnynfph",
|
|
69
69
|
"startedAt": "2026-09-05T05:47:26.453Z",
|
|
70
|
-
"taggedSamples":
|
|
70
|
+
"taggedSamples": 25175
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"lineId": "ln-419463e0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"productId": "pd-b9b15b64",
|
|
78
78
|
"productName": "全协议产品-mtnzg090",
|
|
79
79
|
"startedAt": "2026-09-05T06:09:36.931Z",
|
|
80
|
-
"taggedSamples":
|
|
80
|
+
"taggedSamples": 25155
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
"lineId": "ln-3548f325",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"productId": "pd-fd822802",
|
|
88
88
|
"productName": "runp3-prod",
|
|
89
89
|
"startedAt": "2026-09-05T07:23:51.972Z",
|
|
90
|
-
"taggedSamples":
|
|
90
|
+
"taggedSamples": 1994
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
93
|
"lineId": "ln-c3a7ba01",
|
|
@@ -107,6 +107,6 @@
|
|
|
107
107
|
"productId": "pd-d547a376",
|
|
108
108
|
"productName": "pp-prod",
|
|
109
109
|
"startedAt": "2026-09-05T09:47:55.526Z",
|
|
110
|
-
"taggedSamples":
|
|
110
|
+
"taggedSamples": 393
|
|
111
111
|
}
|
|
112
112
|
]
|
|
@@ -1,50 +1,46 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 安全启动插件(S2,production-readiness-plan)。
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
console.warn('[security] 种子密码检查失败(放行):', String((err as Error)?.message ?? err))
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 安全启动插件(S2,production-readiness-plan)。
|
|
3
|
+
*
|
|
4
|
+
* 用户系统为"首启自注册"设计(users.sqlite 初始零用户,登录页注册的第一个
|
|
5
|
+
* 账号自动成为管理员,见 user.service.register):不存在种子账号,无默认密码
|
|
6
|
+
* 可泄露,故不再做种子密码拦截。
|
|
7
|
+
*
|
|
8
|
+
* 本插件现在只做两件事:
|
|
9
|
+
* 1. 启动时输出管理员初始化状态提示(dev/prod 都生效,不阻断);
|
|
10
|
+
* 2. production 下 sessionPassword 为空/仓库默认值 → 拒绝启动(带修复指引;
|
|
11
|
+
* 密钥走 gitignored .env 经 start.mjs 注入,正常部署不会命中)。
|
|
12
|
+
*
|
|
13
|
+
* 与 workshop.ts 同风格:defineNitroPlugin 为恒等包装,default 直接导出普通函数。
|
|
14
|
+
*/
|
|
15
|
+
import { useRuntimeConfig } from '#imports'
|
|
16
|
+
|
|
17
|
+
/** 仓库默认密钥(泄漏在 config.yml/git 历史,绝不可用于生产) */
|
|
18
|
+
const KNOWN_DEFAULT_PASSWORDS = new Set([
|
|
19
|
+
'awshop-dev-secret-change-me-0123456789',
|
|
20
|
+
'awshop-dev-secret-change-me',
|
|
21
|
+
'change-me',
|
|
22
|
+
])
|
|
23
|
+
|
|
24
|
+
export default async function securityPlugin() {
|
|
25
|
+
// 管理员初始化状态提示(动态 import,避免影响插件加载顺序;检查失败不阻断)
|
|
26
|
+
try {
|
|
27
|
+
const { userRepository } = await import('../repositories/user.repository')
|
|
28
|
+
if (!userRepository.hasActiveAdmin()) {
|
|
29
|
+
console.log('[security] 尚无管理员账号:系统处于初始化状态——在登录页注册的第一个账号将成为管理员。')
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
catch (err) {
|
|
33
|
+
console.warn('[security] 管理员状态检查失败(放行):', String((err as Error)?.message ?? err))
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (process.env.NODE_ENV !== 'production') return
|
|
37
|
+
const password = (useRuntimeConfig() as { session?: { password?: string } }).session?.password ?? ''
|
|
38
|
+
// 空串同样拒绝:NUXT_SESSION_PASSWORD="" 会把烘焙配置覆盖为空值,不能放行
|
|
39
|
+
if (!password || KNOWN_DEFAULT_PASSWORDS.has(password)) {
|
|
40
|
+
throw new Error(
|
|
41
|
+
'[security] 拒绝启动:production 模式下 sessionPassword 为空或仍是仓库默认值。'
|
|
42
|
+
+ '请在 config.yml 的 security.sessionPassword 设置强随机密钥(≥32 位)后重启。'
|
|
43
|
+
+ 'TLS/WSS 部署基线见 README「部署」一节(建议由 caddy/nginx 反向代理终止)。',
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
}
|