agentworkshop 0.7.61 → 0.7.63
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 +2488 -2526
- package/.output/.AgentWorkShop/prompts/host-tools.json +2488 -2526
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{DKHA3XxF.js → B5RD2ZST.js} +1 -1
- package/.output/public/_nuxt/{CeEzUIvN.js → DAfWhONg.js} +2 -2
- package/.output/public/_nuxt/{analysis.DfMg76el.css → analysis.BwhKdel9.css} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/3097fe87-dd0d-4037-b7bb-ead0620af56b.json +1 -0
- package/.output/server/chunks/_/nitro.mjs +2186 -2281
- package/.output/server/chunks/_/nitro.mjs.map +1 -1
- package/.output/server/chunks/build/{analysis-MVEnlO7A.mjs → analysis-CPIxT0FP.mjs} +5 -5
- package/.output/server/chunks/build/{analysis-MVEnlO7A.mjs.map → analysis-CPIxT0FP.mjs.map} +1 -1
- package/.output/server/chunks/routes/renderer.mjs +1 -1
- package/.output/server/chunks/virtual/entry.mjs +1 -1
- package/.output/server/chunks/virtual/precomputed.mjs +1 -1
- package/.output/server/package.json +1 -1
- package/README-zh.md +946 -945
- package/README.md +970 -969
- package/app/components/analysis/AnalysisEditModal.vue +192 -192
- package/config.yml +180 -180
- package/docs/cli.en.md +447 -447
- package/docs/cli.md +412 -412
- package/docs/full-test-plan.md +1 -1
- package/docs/plugins.en.md +1 -1
- package/docs/plugins.md +1 -1
- package/docs/sdk.en.md +1 -1
- package/docs/sdk.md +1 -1
- package/package.json +181 -181
- package/scripts/e2e-plc-plugin-closedloop.mjs +1 -1
- package/server/api/workshop/analysis/[id].patch.ts +100 -100
- package/server/plugins-builtin/diag-bridge/host/diagnosis.mjs +4 -2
- package/server/plugins-builtin/diag-bridge/host/plugin.mjs +2 -0
- package/server/services/workshop/agents/host-tool-bridge/dispatch.ts +241 -243
- package/server/services/workshop/agents/host-tool-bridge/tools/industrial.ts +96 -98
- package/server/services/workshop/agents/industrial/daq-tools.ts +16 -7
- package/server/services/workshop/agents/industrial/dcw-tools.ts +210 -255
- package/server/services/workshop/agents/industrial/index.ts +32 -32
- package/server/services/workshop/agents/industrial/param-tools.ts +0 -40
- package/server/services/workshop/prompts/loader.ts +15 -2
- package/.output/public/_nuxt/builds/meta/eba8574d-1991-47df-944c-18608bb58181.json +0 -1
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* 分析报告人工修订弹窗(v27 编辑面):预填当前值 → PATCH → 父级刷新。
|
|
4
|
-
* 可见性由行级 canEdit(admin/产线 operate)控制;结论明细每行一条,
|
|
5
|
-
* 支撑指标为 JSON 文本(留空 = 保留原值;Agent 面仍无改删,修订全程审计)。
|
|
6
|
-
*/
|
|
7
|
-
import { reactive, watch } from 'vue'
|
|
8
|
-
import { ANALYSIS_CATEGORIES } from '@/app/pages/analysis/types'
|
|
9
|
-
import type { AnalysisReportView } from '@/app/pages/analysis/types'
|
|
10
|
-
|
|
11
|
-
const props = defineProps<{
|
|
12
|
-
/** 待编辑报告(null = 弹窗关闭) */
|
|
13
|
-
report: AnalysisReportView | null
|
|
14
|
-
saving: boolean
|
|
15
|
-
}>()
|
|
16
|
-
|
|
17
|
-
const emit = defineEmits<{
|
|
18
|
-
close: []
|
|
19
|
-
save: [patch: Record<string, unknown>]
|
|
20
|
-
}>()
|
|
21
|
-
|
|
22
|
-
const form = reactive({
|
|
23
|
-
title: '', summary: '', category: '', recipeId: '', recipeVersion: '',
|
|
24
|
-
windowFrom: '', windowTo: '', dataSources: '', conclusions: '', report: '', metrics: '',
|
|
25
|
-
})
|
|
26
|
-
|
|
27
|
-
watch(() => props.report, (r) => {
|
|
28
|
-
if (!r) return
|
|
29
|
-
form.title = r.title
|
|
30
|
-
form.summary = r.summary
|
|
31
|
-
form.category = r.category
|
|
32
|
-
form.recipeId = r.recipeId
|
|
33
|
-
form.recipeVersion = r.recipeVersion
|
|
34
|
-
form.windowFrom = r.windowFrom ?? ''
|
|
35
|
-
form.windowTo = r.windowTo ?? ''
|
|
36
|
-
form.dataSources = r.dataSources
|
|
37
|
-
form.conclusions = (r.conclusions ?? []).join('\n')
|
|
38
|
-
form.report = r.report ?? ''
|
|
39
|
-
form.metrics = Object.keys(r.metrics ?? {}).length ? JSON.stringify(r.metrics, null, 1) : ''
|
|
40
|
-
}, { immediate: true })
|
|
41
|
-
|
|
42
|
-
function submit(): void {
|
|
43
|
-
let metrics: unknown = undefined
|
|
44
|
-
if (form.metrics.trim()) {
|
|
45
|
-
try {
|
|
46
|
-
metrics = JSON.parse(form.metrics)
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
// JSON 非法直接留原值并由后端校验;此处不阻断
|
|
50
|
-
metrics = form.metrics
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
emit('save', {
|
|
54
|
-
title: form.title,
|
|
55
|
-
summary: form.summary,
|
|
56
|
-
category: form.category || 'general',
|
|
57
|
-
recipe_id: form.recipeId.trim(),
|
|
58
|
-
recipe_version: form.recipeVersion.trim(),
|
|
59
|
-
window_from: form.windowFrom.trim(),
|
|
60
|
-
window_to: form.windowTo.trim(),
|
|
61
|
-
data_sources: form.dataSources,
|
|
62
|
-
conclusions: form.conclusions,
|
|
63
|
-
report: form.report,
|
|
64
|
-
...(metrics !== undefined ? { metrics } : {}),
|
|
65
|
-
})
|
|
66
|
-
}
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<template>
|
|
70
|
-
<a-modal
|
|
71
|
-
:open="Boolean(report)"
|
|
72
|
-
:title="$t('analysis.editTitle')"
|
|
73
|
-
:confirm-loading="saving"
|
|
74
|
-
:ok-text="$t('analysis.save')"
|
|
75
|
-
:cancel-text="$t('analysis.cancel')"
|
|
76
|
-
width="720px"
|
|
77
|
-
@ok="submit"
|
|
78
|
-
@cancel="emit('close')"
|
|
79
|
-
>
|
|
80
|
-
<div class="edit-form">
|
|
81
|
-
<label class="fld">
|
|
82
|
-
<span>{{ $t('analysis.thTitle') }}</span>
|
|
83
|
-
<input
|
|
84
|
-
v-model="form.title"
|
|
85
|
-
class="inp-sel"
|
|
86
|
-
>
|
|
87
|
-
</label>
|
|
88
|
-
<label class="fld">
|
|
89
|
-
<span>{{ $t('analysis.thSummary') }}</span>
|
|
90
|
-
<input
|
|
91
|
-
v-model="form.summary"
|
|
92
|
-
class="inp-sel"
|
|
93
|
-
>
|
|
94
|
-
</label>
|
|
95
|
-
<div class="fld-row">
|
|
96
|
-
<label class="fld">
|
|
97
|
-
<span>{{ $t('analysis.fCat') }}</span>
|
|
98
|
-
<select
|
|
99
|
-
v-model="form.category"
|
|
100
|
-
class="inp-sel"
|
|
101
|
-
>
|
|
102
|
-
<option
|
|
103
|
-
v-for="c in ANALYSIS_CATEGORIES"
|
|
104
|
-
:key="c"
|
|
105
|
-
:value="c"
|
|
106
|
-
>
|
|
107
|
-
{{ $t(`analysis.cat.${c}`) }}
|
|
108
|
-
</option>
|
|
109
|
-
</select>
|
|
110
|
-
</label>
|
|
111
|
-
<label class="fld">
|
|
112
|
-
<span>{{ $t('analysis.kRecipe') }}</span>
|
|
113
|
-
<input
|
|
114
|
-
v-model="form.recipeId"
|
|
115
|
-
class="inp-sel"
|
|
116
|
-
placeholder="rcp-…"
|
|
117
|
-
>
|
|
118
|
-
</label>
|
|
119
|
-
<label class="fld">
|
|
120
|
-
<span>{{ $t('analysis.kVersion') }}</span>
|
|
121
|
-
<input
|
|
122
|
-
v-model="form.recipeVersion"
|
|
123
|
-
class="inp-sel"
|
|
124
|
-
>
|
|
125
|
-
</label>
|
|
126
|
-
</div>
|
|
127
|
-
<div class="fld-row">
|
|
128
|
-
<label class="fld">
|
|
129
|
-
<span>{{ $t('analysis.kWindowFrom') }}</span>
|
|
130
|
-
<input
|
|
131
|
-
v-model="form.windowFrom"
|
|
132
|
-
class="inp-sel"
|
|
133
|
-
placeholder="ISO 8601"
|
|
134
|
-
>
|
|
135
|
-
</label>
|
|
136
|
-
<label class="fld">
|
|
137
|
-
<span>{{ $t('analysis.kWindowTo') }}</span>
|
|
138
|
-
<input
|
|
139
|
-
v-model="form.windowTo"
|
|
140
|
-
class="inp-sel"
|
|
141
|
-
placeholder="ISO 8601"
|
|
142
|
-
>
|
|
143
|
-
</label>
|
|
144
|
-
</div>
|
|
145
|
-
<label class="fld">
|
|
146
|
-
<span>{{ $t('analysis.kSources') }}</span>
|
|
147
|
-
<input
|
|
148
|
-
v-model="form.dataSources"
|
|
149
|
-
class="inp-sel"
|
|
150
|
-
>
|
|
151
|
-
</label>
|
|
152
|
-
<label class="fld">
|
|
153
|
-
<span>{{ $t('analysis.kConclusions') }}({{ $t('analysis.conclusionsHint') }})</span>
|
|
154
|
-
<textarea
|
|
155
|
-
v-model="form.conclusions"
|
|
156
|
-
class="inp-sel"
|
|
157
|
-
rows="4"
|
|
158
|
-
/>
|
|
159
|
-
</label>
|
|
160
|
-
<label class="fld">
|
|
161
|
-
<span>{{ $t('analysis.kReport') }}</span>
|
|
162
|
-
<textarea
|
|
163
|
-
v-model="form.report"
|
|
164
|
-
class="inp-sel mono"
|
|
165
|
-
rows="6"
|
|
166
|
-
/>
|
|
167
|
-
</label>
|
|
168
|
-
<label class="fld">
|
|
169
|
-
<span>{{ $t('analysis.kMetrics') }}(JSON)</span>
|
|
170
|
-
<textarea
|
|
171
|
-
v-model="form.metrics"
|
|
172
|
-
class="inp-sel mono"
|
|
173
|
-
rows="4"
|
|
174
|
-
/>
|
|
175
|
-
</label>
|
|
176
|
-
</div>
|
|
177
|
-
</a-modal>
|
|
178
|
-
</template>
|
|
179
|
-
|
|
180
|
-
<style scoped>
|
|
181
|
-
.edit-form { display: flex; flex-direction: column; gap: 10px; max-height: 64vh; overflow: auto; padding-right: 4px; }
|
|
182
|
-
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-faint); }
|
|
183
|
-
.fld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
|
|
184
|
-
.inp-sel {
|
|
185
|
-
min-width: 0; padding: 6px 9px; font-size: 13px; color: var(--ink);
|
|
186
|
-
background: var(--frost-bg);
|
|
187
|
-
border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
188
|
-
}
|
|
189
|
-
.inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
190
|
-
textarea.inp-sel { resize: vertical; line-height: 1.6; }
|
|
191
|
-
.mono { font-family: var(--font-mono, monospace); font-size: 11.5px; }
|
|
192
|
-
</style>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* 分析报告人工修订弹窗(v27 编辑面):预填当前值 → PATCH → 父级刷新。
|
|
4
|
+
* 可见性由行级 canEdit(admin/产线 operate)控制;结论明细每行一条,
|
|
5
|
+
* 支撑指标为 JSON 文本(留空 = 保留原值;Agent 面仍无改删,修订全程审计)。
|
|
6
|
+
*/
|
|
7
|
+
import { reactive, watch } from 'vue'
|
|
8
|
+
import { ANALYSIS_CATEGORIES } from '@/app/pages/analysis/types'
|
|
9
|
+
import type { AnalysisReportView } from '@/app/pages/analysis/types'
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
/** 待编辑报告(null = 弹窗关闭) */
|
|
13
|
+
report: AnalysisReportView | null
|
|
14
|
+
saving: boolean
|
|
15
|
+
}>()
|
|
16
|
+
|
|
17
|
+
const emit = defineEmits<{
|
|
18
|
+
close: []
|
|
19
|
+
save: [patch: Record<string, unknown>]
|
|
20
|
+
}>()
|
|
21
|
+
|
|
22
|
+
const form = reactive({
|
|
23
|
+
title: '', summary: '', category: '', recipeId: '', recipeVersion: '',
|
|
24
|
+
windowFrom: '', windowTo: '', dataSources: '', conclusions: '', report: '', metrics: '',
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
watch(() => props.report, (r) => {
|
|
28
|
+
if (!r) return
|
|
29
|
+
form.title = r.title
|
|
30
|
+
form.summary = r.summary
|
|
31
|
+
form.category = r.category
|
|
32
|
+
form.recipeId = r.recipeId
|
|
33
|
+
form.recipeVersion = r.recipeVersion
|
|
34
|
+
form.windowFrom = r.windowFrom ?? ''
|
|
35
|
+
form.windowTo = r.windowTo ?? ''
|
|
36
|
+
form.dataSources = r.dataSources
|
|
37
|
+
form.conclusions = (r.conclusions ?? []).join('\n')
|
|
38
|
+
form.report = r.report ?? ''
|
|
39
|
+
form.metrics = Object.keys(r.metrics ?? {}).length ? JSON.stringify(r.metrics, null, 1) : ''
|
|
40
|
+
}, { immediate: true })
|
|
41
|
+
|
|
42
|
+
function submit(): void {
|
|
43
|
+
let metrics: unknown = undefined
|
|
44
|
+
if (form.metrics.trim()) {
|
|
45
|
+
try {
|
|
46
|
+
metrics = JSON.parse(form.metrics)
|
|
47
|
+
}
|
|
48
|
+
catch {
|
|
49
|
+
// JSON 非法直接留原值并由后端校验;此处不阻断
|
|
50
|
+
metrics = form.metrics
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
emit('save', {
|
|
54
|
+
title: form.title,
|
|
55
|
+
summary: form.summary,
|
|
56
|
+
category: form.category || 'general',
|
|
57
|
+
recipe_id: form.recipeId.trim(),
|
|
58
|
+
recipe_version: form.recipeVersion.trim(),
|
|
59
|
+
window_from: form.windowFrom.trim(),
|
|
60
|
+
window_to: form.windowTo.trim(),
|
|
61
|
+
data_sources: form.dataSources,
|
|
62
|
+
conclusions: form.conclusions,
|
|
63
|
+
report: form.report,
|
|
64
|
+
...(metrics !== undefined ? { metrics } : {}),
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<template>
|
|
70
|
+
<a-modal
|
|
71
|
+
:open="Boolean(report)"
|
|
72
|
+
:title="$t('analysis.editTitle')"
|
|
73
|
+
:confirm-loading="saving"
|
|
74
|
+
:ok-text="$t('analysis.save')"
|
|
75
|
+
:cancel-text="$t('analysis.cancel')"
|
|
76
|
+
width="720px"
|
|
77
|
+
@ok="submit"
|
|
78
|
+
@cancel="emit('close')"
|
|
79
|
+
>
|
|
80
|
+
<div class="edit-form">
|
|
81
|
+
<label class="fld">
|
|
82
|
+
<span>{{ $t('analysis.thTitle') }}</span>
|
|
83
|
+
<input
|
|
84
|
+
v-model="form.title"
|
|
85
|
+
class="inp-sel"
|
|
86
|
+
>
|
|
87
|
+
</label>
|
|
88
|
+
<label class="fld">
|
|
89
|
+
<span>{{ $t('analysis.thSummary') }}</span>
|
|
90
|
+
<input
|
|
91
|
+
v-model="form.summary"
|
|
92
|
+
class="inp-sel"
|
|
93
|
+
>
|
|
94
|
+
</label>
|
|
95
|
+
<div class="fld-row">
|
|
96
|
+
<label class="fld">
|
|
97
|
+
<span>{{ $t('analysis.fCat') }}</span>
|
|
98
|
+
<select
|
|
99
|
+
v-model="form.category"
|
|
100
|
+
class="inp-sel"
|
|
101
|
+
>
|
|
102
|
+
<option
|
|
103
|
+
v-for="c in ANALYSIS_CATEGORIES"
|
|
104
|
+
:key="c"
|
|
105
|
+
:value="c"
|
|
106
|
+
>
|
|
107
|
+
{{ $t(`analysis.cat.${c}`) }}
|
|
108
|
+
</option>
|
|
109
|
+
</select>
|
|
110
|
+
</label>
|
|
111
|
+
<label class="fld">
|
|
112
|
+
<span>{{ $t('analysis.kRecipe') }}</span>
|
|
113
|
+
<input
|
|
114
|
+
v-model="form.recipeId"
|
|
115
|
+
class="inp-sel"
|
|
116
|
+
placeholder="rcp-…"
|
|
117
|
+
>
|
|
118
|
+
</label>
|
|
119
|
+
<label class="fld">
|
|
120
|
+
<span>{{ $t('analysis.kVersion') }}</span>
|
|
121
|
+
<input
|
|
122
|
+
v-model="form.recipeVersion"
|
|
123
|
+
class="inp-sel"
|
|
124
|
+
>
|
|
125
|
+
</label>
|
|
126
|
+
</div>
|
|
127
|
+
<div class="fld-row">
|
|
128
|
+
<label class="fld">
|
|
129
|
+
<span>{{ $t('analysis.kWindowFrom') }}</span>
|
|
130
|
+
<input
|
|
131
|
+
v-model="form.windowFrom"
|
|
132
|
+
class="inp-sel"
|
|
133
|
+
placeholder="ISO 8601"
|
|
134
|
+
>
|
|
135
|
+
</label>
|
|
136
|
+
<label class="fld">
|
|
137
|
+
<span>{{ $t('analysis.kWindowTo') }}</span>
|
|
138
|
+
<input
|
|
139
|
+
v-model="form.windowTo"
|
|
140
|
+
class="inp-sel"
|
|
141
|
+
placeholder="ISO 8601"
|
|
142
|
+
>
|
|
143
|
+
</label>
|
|
144
|
+
</div>
|
|
145
|
+
<label class="fld">
|
|
146
|
+
<span>{{ $t('analysis.kSources') }}</span>
|
|
147
|
+
<input
|
|
148
|
+
v-model="form.dataSources"
|
|
149
|
+
class="inp-sel"
|
|
150
|
+
>
|
|
151
|
+
</label>
|
|
152
|
+
<label class="fld">
|
|
153
|
+
<span>{{ $t('analysis.kConclusions') }}({{ $t('analysis.conclusionsHint') }})</span>
|
|
154
|
+
<textarea
|
|
155
|
+
v-model="form.conclusions"
|
|
156
|
+
class="inp-sel"
|
|
157
|
+
rows="4"
|
|
158
|
+
/>
|
|
159
|
+
</label>
|
|
160
|
+
<label class="fld">
|
|
161
|
+
<span>{{ $t('analysis.kReport') }}</span>
|
|
162
|
+
<textarea
|
|
163
|
+
v-model="form.report"
|
|
164
|
+
class="inp-sel mono"
|
|
165
|
+
rows="6"
|
|
166
|
+
/>
|
|
167
|
+
</label>
|
|
168
|
+
<label class="fld">
|
|
169
|
+
<span>{{ $t('analysis.kMetrics') }}(JSON)</span>
|
|
170
|
+
<textarea
|
|
171
|
+
v-model="form.metrics"
|
|
172
|
+
class="inp-sel mono"
|
|
173
|
+
rows="4"
|
|
174
|
+
/>
|
|
175
|
+
</label>
|
|
176
|
+
</div>
|
|
177
|
+
</a-modal>
|
|
178
|
+
</template>
|
|
179
|
+
|
|
180
|
+
<style scoped>
|
|
181
|
+
.edit-form { display: flex; flex-direction: column; gap: 10px; max-height: 64vh; overflow: auto; padding-right: 4px; }
|
|
182
|
+
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-faint); }
|
|
183
|
+
.fld-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
|
|
184
|
+
.inp-sel {
|
|
185
|
+
min-width: 0; padding: 6px 9px; font-size: 13px; color: var(--ink);
|
|
186
|
+
background: var(--frost-bg);
|
|
187
|
+
border: 1px solid var(--glass-line); border-radius: 7px; outline: none;
|
|
188
|
+
}
|
|
189
|
+
.inp-sel:focus { border-color: color-mix(in srgb, var(--tone-info-dot) 55%, transparent); }
|
|
190
|
+
textarea.inp-sel { resize: vertical; line-height: 1.6; }
|
|
191
|
+
.mono { font-family: var(--font-mono, monospace); font-size: 11.5px; }
|
|
192
|
+
</style>
|