agentworkshop 0.7.64 → 0.7.65
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/874575e6-2606-4f09-a59b-724158b3aba2.json +1 -0
- package/.output/server/chunks/_/nitro.mjs +964 -964
- package/.output/server/package.json +1 -1
- package/README-zh.md +1 -1
- package/README.md +1 -1
- package/config.yml +1 -1
- package/docs/cli.en.md +2 -2
- package/docs/cli.md +2 -2
- 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 +1 -1
- package/server/services/workshop/agents/industrial/dcw-tools.ts +5 -3
- package/server/services/workshop/agents/industrial/param-tools.ts +1 -84
- package/.output/public/_nuxt/builds/meta/1809e625-ff1d-4fd5-9ad2-28cea81f06ab.json +0 -1
package/README-zh.md
CHANGED
|
@@ -390,7 +390,7 @@ aw update --check # 只报告,不安装
|
|
|
390
390
|
npm install -g agentworkshop@latest # 手动等效
|
|
391
391
|
```
|
|
392
392
|
|
|
393
|
-
版本遵循 semver。每次 `aw start` 都会校验配置根,并把 `home` 之前的旧版 `data/` 布局迁移进来(以最新文件为准),因此数据可以跨版本存活。SQLite schema 迁移在服务端启动时执行。当前版本:**v0.7.
|
|
393
|
+
版本遵循 semver。每次 `aw start` 都会校验配置根,并把 `home` 之前的旧版 `data/` 布局迁移进来(以最新文件为准),因此数据可以跨版本存活。SQLite schema 迁移在服务端启动时执行。当前版本:**v0.7.65**——见[版本发布](https://github.com/kingdol666/AgentWorkShop/releases)。
|
|
394
394
|
|
|
395
395
|
### 第一次「Agent × 产线」会话(约 2 分钟)
|
|
396
396
|
|
package/README.md
CHANGED
|
@@ -381,7 +381,7 @@ aw update --check # only report; nothing is installed
|
|
|
381
381
|
npm install -g agentworkshop@latest # manual equivalent
|
|
382
382
|
```
|
|
383
383
|
|
|
384
|
-
Releases follow semver. `aw start` verifies the config root on every launch and migrates the legacy pre-`home` `data/` layout into it (newest file wins), so data survives upgrades. SQLite schema migrations run server-side at boot. Current version: **v0.7.
|
|
384
|
+
Releases follow semver. `aw start` verifies the config root on every launch and migrates the legacy pre-`home` `data/` layout into it (newest file wins), so data survives upgrades. SQLite schema migrations run server-side at boot. Current version: **v0.7.65** — see [Releases](https://github.com/kingdol666/AgentWorkShop/releases).
|
|
385
385
|
|
|
386
386
|
### Your first agent × line session (~2 minutes)
|
|
387
387
|
|
package/config.yml
CHANGED
package/docs/cli.en.md
CHANGED
|
@@ -62,7 +62,7 @@ pnpm tui # the terminal workbench
|
|
|
62
62
|
### 3. Quick use via npx (no global install)
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
|
-
npx agentworkshop start # fetch and start (pin a version with: npx agentworkshop@0.7.
|
|
65
|
+
npx agentworkshop start # fetch and start (pin a version with: npx agentworkshop@0.7.65 start)
|
|
66
66
|
npx agentworkshop doctor # subcommands work as usual
|
|
67
67
|
npx -p agentworkshop aw doctor # use -p when you want the name aw
|
|
68
68
|
```
|
|
@@ -79,7 +79,7 @@ npx -p agentworkshop aw doctor # use -p when you want the name aw
|
|
|
79
79
|
| Package manager | `pnpm@11.9.0` (`packageManager`, needed only for source development) |
|
|
80
80
|
| Module format | ESM (`type: module`) |
|
|
81
81
|
| License | `Apache-2.0` |
|
|
82
|
-
| Current version | `0.7.
|
|
82
|
+
| Current version | `0.7.65` (`package.json`) |
|
|
83
83
|
|
|
84
84
|
## 2. First start (the Claude Code experience)
|
|
85
85
|
|
package/docs/cli.md
CHANGED
|
@@ -60,7 +60,7 @@ pnpm tui # 终端工作台
|
|
|
60
60
|
### 3. npx 快速使用(免全局安装)
|
|
61
61
|
|
|
62
62
|
```bash
|
|
63
|
-
npx agentworkshop start # 拉取并启动(可锁定版本: npx agentworkshop@0.7.
|
|
63
|
+
npx agentworkshop start # 拉取并启动(可锁定版本: npx agentworkshop@0.7.65 start)
|
|
64
64
|
npx agentworkshop doctor # 子命令照常可用
|
|
65
65
|
npx -p agentworkshop aw doctor # 需要 aw 这个名字时用 -p 指定包
|
|
66
66
|
```
|
|
@@ -76,7 +76,7 @@ npx -p agentworkshop aw doctor # 需要 aw 这个名字时用 -p 指定包
|
|
|
76
76
|
| 包管理器 | `pnpm@11.9.0`(`packageManager`,仅源码开发需要) |
|
|
77
77
|
| 模块形态 | ESM(`type: module`) |
|
|
78
78
|
| 许可证 | `Apache-2.0` |
|
|
79
|
-
| 当前版本 | `0.7.
|
|
79
|
+
| 当前版本 | `0.7.65`(`package.json`) |
|
|
80
80
|
|
|
81
81
|
## 二、首次启动(Claude Code 式)
|
|
82
82
|
|
package/docs/full-test-plan.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AgentWorkShop 全功能测试流程 Plan
|
|
2
2
|
|
|
3
|
-
> 版本无关的常备测试手册(撰写时基线 v0.7.
|
|
3
|
+
> 版本无关的常备测试手册(撰写时基线 v0.7.64)。用途:后续直接指令 agent
|
|
4
4
|
> 「按 docs/full-test-plan.md 执行 Phase 0–N」即可完成全功能测试。
|
|
5
5
|
> 断言数为历史全绿基线(2026-09 上旬各轮验收),以脚本实际输出为准;括号内数字仅用于识别明显回退。
|
|
6
6
|
> 最后核对:2026-09-12(脚本清单逐一经 `scripts/` 实存核对)。
|
package/docs/plugins.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
> Applies to: plugin system v2 has been available since **v0.7.29** (frontend component
|
|
11
11
|
> injection / plugin settings / plugin i18n / runtime services surface); this document
|
|
12
|
-
> describes **v0.7.
|
|
12
|
+
> describes **v0.7.65**. `ctx.sdkVersion` is currently `0.3.0`.
|
|
13
13
|
|
|
14
14
|
## 1. Folder layout & quick start
|
|
15
15
|
|
package/docs/plugins.md
CHANGED
package/docs/sdk.en.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
**SDK version constants**: server-side `SDK_VERSION = '0.3.0'`, browser-side `CLIENT_SDK_VERSION = '0.3.0'`.
|
|
9
9
|
These two constants are the **interface version of the SDK itself** and evolve **independently**
|
|
10
|
-
from the npm package version (the `version` field in `package.json`, currently 0.7.
|
|
10
|
+
from the npm package version (the `version` field in `package.json`, currently 0.7.65) —
|
|
11
11
|
them being out of sync is expected. Never use `SDK_VERSION` to infer the package version, or the reverse.
|
|
12
12
|
**Module format**: ESM only (only `import` / `export`; there is no CJS entry).
|
|
13
13
|
**Types**: `sdk/index.d.mts` and `sdk/client.d.mts` ship with the package, so TypeScript projects
|
package/docs/sdk.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
> 零第三方运行时依赖,Node ≥ 23.4 与现代浏览器双端可用。
|
|
6
6
|
|
|
7
7
|
**SDK 版本常量**:服务端 `SDK_VERSION = '0.3.0'`,浏览器端 `CLIENT_SDK_VERSION = '0.3.0'`。
|
|
8
|
-
这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.7.
|
|
8
|
+
这两个常量是 **SDK 自身接口的版本号**,与 npm 包版本(`package.json` 的 `version`,当前 0.7.65)
|
|
9
9
|
**各自独立演进** —— 常数不同步是预期行为,不要拿 `SDK_VERSION` 去推断包版本,反之亦然。
|
|
10
10
|
**模块形态**:ESM only(只有 `import` / `export`,没有 CJS 入口)。
|
|
11
11
|
**类型**:`sdk/index.d.mts`、`sdk/client.d.mts` 随包发布,TS 项目零配置获得提示(覆盖范围见 §7)。
|
package/package.json
CHANGED
|
@@ -102,11 +102,13 @@ export async function toolDcwControl(agentId: string, args: { node_id?: string,
|
|
|
102
102
|
* profile 门控)的写入委托它执行 —— Agent 可调用面依然收敛在配方面,此处非 Agent 入口。
|
|
103
103
|
*/
|
|
104
104
|
export async function dcwControlGovernedInternal(agentId: string, args: { node_id?: string, value?: number | string, hypothesis?: string, task_id?: string }, channelId?: string): Promise<{ text: string, isError?: boolean }> {
|
|
105
|
-
return
|
|
105
|
+
return dcwControlGovernedLegacy(agentId, args, channelId)
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
/** v2 前的直写实现(
|
|
109
|
-
|
|
108
|
+
/** v2 前的直写实现(治理链完整:四层限界/HITL/60s 联锁/journal/open 记录)。
|
|
109
|
+
* 非任何 Agent 工具入口 —— 仅由 dcwControlGovernedInternal 承载平台内部治理写
|
|
110
|
+
* (optimization_explore 闭环探索的写入委托),Agent 可调用面依然收敛在配方面。 */
|
|
111
|
+
async function dcwControlGovernedLegacy(agentId: string, args: { node_id?: string, value?: number | string, hypothesis?: string, task_id?: string }, channelId?: string): Promise<{ text: string, isError?: boolean }> {
|
|
110
112
|
const twinGuard = guardTwinWrite(agentId, channelId)
|
|
111
113
|
if (!twinGuard.allowed) return { text: `${twinGuard.code}: ${twinGuard.message}`, isError: true }
|
|
112
114
|
const nodeId = String(args.node_id ?? '').trim()
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* 工艺参数语义面辅助(参数引用解析/量程文本/写容差)与 param_control 的 v2 禁用桩
|
|
3
3
|
* (由 server/services/workshop/agents/industrial-tools.ts 按职责拆出;内容逐行原文搬运)
|
|
4
4
|
*/
|
|
5
5
|
import type { DcwParamView } from '../../../../../shared/dcw-protocol'
|
|
6
|
-
import { agentBadgeLabel } from '../agent-badge'
|
|
7
|
-
import { getAgentNodeBindingRepo } from '../node-bindings.repo'
|
|
8
6
|
import { getDcwController } from '../../dcw/dcw-controller'
|
|
9
7
|
import { getDcwParamRepo } from '../../dcw/param-map.repo'
|
|
10
|
-
import { getRecipeRollBackManager } from '../../dcw/recipe-rollback-manager'
|
|
11
8
|
import { limitsBreakdownOf } from '../../dcw/param-limits'
|
|
12
|
-
import { guardTwinWrite } from '../../aml/twin/write-guard'
|
|
13
|
-
import { requestManualApproval } from './manual-approval'
|
|
14
9
|
|
|
15
10
|
/** 读/设定偏差对照容差(与服务端回读死区同口径) */
|
|
16
11
|
export function writeToleranceOf(node: { decimals: number, min: number, max: number }): number {
|
|
@@ -72,81 +67,3 @@ export async function toolParamControl(agentId: string, args: {
|
|
|
72
67
|
isError: true,
|
|
73
68
|
}
|
|
74
69
|
}
|
|
75
|
-
|
|
76
|
-
/** v2 前的语义参数直写实现(已停用;保留供回溯,不再被任何入口调用) */
|
|
77
|
-
async function _toolParamControlDisabled(agentId: string, args: {
|
|
78
|
-
param?: string
|
|
79
|
-
value?: number | string
|
|
80
|
-
hypothesis?: string
|
|
81
|
-
task_id?: string
|
|
82
|
-
line_id?: string
|
|
83
|
-
}, channelId?: string): Promise<{ text: string, isError?: boolean }> {
|
|
84
|
-
void channelId
|
|
85
|
-
const twinGuard = guardTwinWrite(agentId, channelId)
|
|
86
|
-
if (!twinGuard.allowed) return { text: `${twinGuard.code}: ${twinGuard.message}`, isError: true }
|
|
87
|
-
const resolved = resolveParamRef(String(args.param ?? ''), args.line_id ? String(args.line_id) : undefined)
|
|
88
|
-
if (!resolved.ok) return resolved
|
|
89
|
-
const param = resolved.param
|
|
90
|
-
const value = Number(args.value)
|
|
91
|
-
if (!Number.isFinite(value)) {
|
|
92
|
-
return { text: '设定值 value 必须为数字。', isError: true }
|
|
93
|
-
}
|
|
94
|
-
const repo = getAgentNodeBindingRepo()
|
|
95
|
-
const binding = repo.find(agentId, param.nodeId, 'dcw')
|
|
96
|
-
if (!binding) {
|
|
97
|
-
const mine = repo.byAgent(agentId).filter(b => b.kind === 'dcw')
|
|
98
|
-
return {
|
|
99
|
-
text: mine.length
|
|
100
|
-
? `无权操作工艺参数「${param.key}」(执行节点 ${param.nodeId} 未绑定给你)。你有权控制的数控节点:${mine.map(b => b.nodeId).join(', ')}。`
|
|
101
|
-
: '你尚未绑定任何数控节点,无权下发控制指令。请在数字孪生界面绑定数控节点。',
|
|
102
|
-
isError: true,
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
const node = getDcwController().byId(param.nodeId)
|
|
106
|
-
if (!node) {
|
|
107
|
-
repo.removeAgentNode(agentId, param.nodeId, 'dcw')
|
|
108
|
-
return { text: `工艺参数「${param.key}」的执行节点已不存在(可能被删除),原绑定已自动清理。`, isError: true }
|
|
109
|
-
}
|
|
110
|
-
if (!node.enabled) {
|
|
111
|
-
return { text: `工艺参数「${param.key}」的执行节点「${node.name}」已停用(控制已暂停),无法下发。`, isError: true }
|
|
112
|
-
}
|
|
113
|
-
// 手动确认模式:与 dcw_control 同源审批面(manual-approval),备注回给 Agent。
|
|
114
|
-
// 调整依据(hypothesis)进审批详情 —— 人机交互透明化:人类在审批面板直接看到
|
|
115
|
-
// Agent 基于什么分析/判断要这样调;批准附言与拒绝意见均随回执回流。
|
|
116
|
-
let manualFeedback = ''
|
|
117
|
-
if (binding.mode === 'manual') {
|
|
118
|
-
const rationale = args.hypothesis ? String(args.hypothesis).trim() : ''
|
|
119
|
-
const ap = await requestManualApproval({
|
|
120
|
-
agentId,
|
|
121
|
-
nodeId: param.nodeId,
|
|
122
|
-
detail: `工艺参数「${param.key}」(${param.name})设定 ${value}${param.unit},${paramLimitsText(param)}${rationale ? `;调整依据:${rationale}` : ''}`,
|
|
123
|
-
})
|
|
124
|
-
if (!ap.ok) return { text: ap.text, isError: ap.isError }
|
|
125
|
-
manualFeedback = ap.comment ?? ''
|
|
126
|
-
}
|
|
127
|
-
try {
|
|
128
|
-
const meta = {
|
|
129
|
-
source: 'agent' as const,
|
|
130
|
-
actor: agentId,
|
|
131
|
-
actorName: agentBadgeLabel(agentId),
|
|
132
|
-
taskId: args.task_id ? String(args.task_id) : undefined,
|
|
133
|
-
hypothesis: args.hypothesis ? String(args.hypothesis) : '',
|
|
134
|
-
}
|
|
135
|
-
const outcome = await getDcwController().writeParam(param.id, value, meta)
|
|
136
|
-
if (outcome.ok) {
|
|
137
|
-
const stable = getRecipeRollBackManager().journal({ nodeId: param.nodeId, limit: 10 }).find(a => a.prevValue != null && a.prevValue !== a.newValue)
|
|
138
|
-
const loopTxt = [
|
|
139
|
-
outcome.recordId ? `优化记录 ${outcome.recordId} 已开窗(观察数采后 dcw_judge 落判定)` : null,
|
|
140
|
-
stable ? `上一稳定锚:${stable.prevValue}${param.unit}(可 dcw_rollback 回退)` : null,
|
|
141
|
-
].filter(Boolean).join(';')
|
|
142
|
-
return {
|
|
143
|
-
text: `下发成功:工艺参数「${param.key}」(${param.name})设定 ${value}${param.unit} → 执行节点「${node.name}」;回读 ${outcome.readback != null ? `${outcome.readback}${param.unit}` : '不支持'}一致。${paramLimitsText(param)}。${outcome.message}${loopTxt ? `\n[调控闭环] ${loopTxt}` : ''}${manualFeedback ? `\n[人工反馈] ${manualFeedback}` : ''}`,
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
return { text: `下发失败:${outcome.message}(工艺参数 ${param.key},执行节点「${node.name}」;${paramLimitsText(param)};当前设定值保持 ${node.value ?? '原值'}${param.unit} 未被改动)`, isError: true }
|
|
147
|
-
}
|
|
148
|
-
catch (err) {
|
|
149
|
-
const msg = err instanceof Error ? err.message : String(err)
|
|
150
|
-
return { text: `下发被拒绝:${msg}(工艺参数 ${param.key};${paramLimitsText(param)})`, isError: true }
|
|
151
|
-
}
|
|
152
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"1809e625-ff1d-4fd5-9ad2-28cea81f06ab","timestamp":1792040450938,"prerendered":[]}
|