Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
823e7a7
feat: add source v2 snapshot contracts
Scaxlibur Aug 22, 2026
3a7392e
fix: fail closed on invalid source output amplitude
Scaxlibur Aug 22, 2026
12a41c5
feat: add source v2 safety configuration axes
Scaxlibur Aug 22, 2026
d8f75f9
feat: bind source termination safety evidence
Scaxlibur Aug 22, 2026
49448af
feat: evaluate conservative source output budgets
Scaxlibur Aug 22, 2026
c2af522
feat: add source v2 operation context guards
Scaxlibur Aug 22, 2026
aab6ef2
feat: audit source v1 routes and artifacts
Scaxlibur Aug 22, 2026
b190b99
feat: gate managed source v2 plugin compatibility
Scaxlibur Aug 22, 2026
1077418
docs: accept source v2 basic write R6
Scaxlibur Aug 23, 2026
c840462
docs: define source output v2 operation directions
Scaxlibur Aug 23, 2026
0c72445
feat: register source v2 basic write contracts
Scaxlibur Aug 23, 2026
6efffe8
feat: bind source preflight snapshots in operation contexts
Scaxlibur Aug 23, 2026
7d33ebc
feat: add source v2 basic configure transaction
Scaxlibur Aug 23, 2026
b9f5614
fix: keep source v2 output disable independent of vpp
Scaxlibur Aug 23, 2026
a646c36
feat: add source v2 output transactions
Scaxlibur Aug 23, 2026
00706a3
feat: expose source v2 service routes
Scaxlibur Aug 23, 2026
b720e60
feat: add source v2 write cli commands
Scaxlibur Aug 23, 2026
99455c3
feat: add source v2 run plan schema
Scaxlibur Aug 23, 2026
901f013
feat: execute source v2 run plan steps
Scaxlibur Aug 23, 2026
40f2e3b
test: cover source v2 dual contract routes
Scaxlibur Aug 23, 2026
4fb63bc
docs: document source v2 write entry points
Scaxlibur Aug 23, 2026
1f8ea35
fix: preserve legacy source route validation
Scaxlibur Aug 23, 2026
fc30803
test: install core release artifacts offline
Scaxlibur Aug 23, 2026
1e246c7
test: cover source v1 v2 plugin compatibility
Scaxlibur Aug 23, 2026
998df6a
test: freeze v1 source run artifacts
Scaxlibur Aug 23, 2026
1ccf583
test: classify source v1 dual-contract routes
Scaxlibur Aug 23, 2026
3ef74ff
docs: record source v2 candidate release gate
Scaxlibur Aug 23, 2026
5bd82df
docs: scope source v2 harmonic milestone
Scaxlibur Aug 23, 2026
ad20582
feat: define source v2 harmonic contracts
Scaxlibur Aug 23, 2026
7bc0740
feat: add source v2 harmonic transaction
Scaxlibur Aug 23, 2026
387db4e
feat: add source v2 harmonic cli
Scaxlibur Aug 23, 2026
b2e8475
feat: add source v2 harmonic run plan
Scaxlibur Aug 23, 2026
bcfc200
docs: document source v2 harmonic entry points
Scaxlibur Aug 23, 2026
6d232d6
docs: scope source v2 internal am modulation
Scaxlibur Aug 23, 2026
80147a0
feat: define source v2 internal am contracts
Scaxlibur Aug 23, 2026
6e24e35
feat: add source v2 internal am transaction
Scaxlibur Aug 23, 2026
2c6466d
feat: add source v2 internal am run plan
Scaxlibur Aug 23, 2026
aad0cc1
docs: document source v2 internal am entry points
Scaxlibur Aug 23, 2026
ea0e2a8
feat: define source v2 width pulse contracts
Scaxlibur Aug 23, 2026
83fb304
feat: add source v2 width pulse transaction
Scaxlibur Aug 23, 2026
645863b
feat: add source v2 width pulse run plan
Scaxlibur Aug 23, 2026
e22d7f2
docs: document source v2 width pulse entry points
Scaxlibur Aug 23, 2026
d23d6da
feat: define source v2 internal pm contracts
Scaxlibur Aug 23, 2026
d722e67
feat: add source v2 internal pm transaction
Scaxlibur Aug 23, 2026
14100cc
feat: add source v2 internal pm run plan
Scaxlibur Aug 23, 2026
47e912b
docs: document source v2 internal pm entry points
Scaxlibur Aug 23, 2026
338e960
feat: define source v2 triggered burst contracts
Scaxlibur Aug 23, 2026
661cf86
feat: add source v2 triggered burst transaction
Scaxlibur Aug 23, 2026
b58ad36
docs: document source v2 triggered burst entry points
Scaxlibur Aug 23, 2026
accf6ec
feat: define source v2 internal fm contracts
Scaxlibur Aug 23, 2026
0094f83
feat: add source v2 internal fm transaction
Scaxlibur Aug 23, 2026
ba0ef8c
docs: document source v2 internal fm entry points
Scaxlibur Aug 23, 2026
65c1186
feat: define source v2 internal pwm contracts
Scaxlibur Aug 23, 2026
bae98fc
feat: add source v2 internal pwm transaction
Scaxlibur Aug 23, 2026
0d32196
docs: document source v2 internal pwm entry points
Scaxlibur Aug 23, 2026
3a2776b
feat: define source v2 internal sweep contracts
Scaxlibur Aug 23, 2026
d943208
feat: add source v2 internal sweep transaction
Scaxlibur Aug 23, 2026
b04e416
docs: document source v2 internal sweep entry points
Scaxlibur Aug 23, 2026
897504b
feat: define source v2 arbitrary storage contracts
Scaxlibur Aug 23, 2026
78a471a
feat: add source v2 arbitrary transactions
Scaxlibur Aug 23, 2026
72f4346
feat: add source v2 arbitrary cli and run steps
Scaxlibur Aug 23, 2026
275a8b7
docs: document source v2 arbitrary operations
Scaxlibur Aug 23, 2026
1d8c7e5
test: extend source v1 route audit for arbitrary v2
Scaxlibur Aug 23, 2026
27ed44d
feat: define source v2 cross-channel contracts
Scaxlibur Aug 23, 2026
c636ae6
feat: add source v2 cross-channel transactions
Scaxlibur Aug 23, 2026
aa96588
docs: document source v2 cross-channel operations
Scaxlibur Aug 23, 2026
b5b35f2
fix: preserve v1 source function compatibility
Scaxlibur Aug 23, 2026
8f0d66c
docs: clarify source v1 waveform fallback
Scaxlibur Aug 23, 2026
39ff0ab
docs: update source v2 plugin milestones
Scaxlibur Aug 23, 2026
e989d50
feat: define harmonic disable v2 contract
Scaxlibur Aug 23, 2026
9535a89
feat: add harmonic disable v2 operation
Scaxlibur Aug 23, 2026
78dfe5a
docs: align development version metadata
Scaxlibur Aug 23, 2026
90b0123
docs: update source v2 plugin acceptance status
Scaxlibur Aug 23, 2026
c1917eb
docs: record source v2 basic a3 status
Scaxlibur Aug 23, 2026
c0f386d
docs: define source conformance wheel binding
Scaxlibur Aug 23, 2026
f5c59eb
feat: add source conformance manifest model
Scaxlibur Aug 23, 2026
8696ef8
feat: verify source conformance package evidence
Scaxlibur Aug 23, 2026
e6de020
fix: allow shared channel conformance evidence
Scaxlibur Aug 23, 2026
48dd9a2
fix: preserve conformance evidence ordering
Scaxlibur Aug 23, 2026
988bf2e
docs: close source v2 c3 candidate audit
Scaxlibur Aug 23, 2026
38d7765
test: expose release artifact smoke failures
Scaxlibur Aug 24, 2026
55f1a2c
test: stabilize cross-platform release smoke
Scaxlibur Aug 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

WaveBench 是一个用 Python 编写的实验室自动测量台,面向电子设计竞赛调试和日常实验。它把仪器控制、实验步骤和采集证据放在同一条命令链中,支持先离线检查 plan,再决定是否连接硬件。

当前仓库开发线为 `0.8.23`,最新稳定 tag 为 `v0.8.0`。不同版本的命令和能力可能不同,以对应 tag 中的文档为准。
当前仓库开发线为 `0.8.24`,最新稳定 tag 为 `v0.8.0`。不同版本的命令和能力可能不同,以对应 tag 中的文档为准。

## 🌟 特别鸣谢

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[English](README_EN.md) · 中文

WaveBench 是一个用 Python 编写的实验室自动测量台,提供 CLI、实验性 TUI、显式 run plan、采集包和离线报告。当前开发线为 `0.8.22`,最新稳定 tag 为 `v0.8.0`。版本变化见 [更新日志](../CHANGELOG.md);旧版本原始文档可切换到对应 Git tag 查看。
WaveBench 是一个用 Python 编写的实验室自动测量台,提供 CLI、实验性 TUI、显式 run plan、采集包和离线报告。当前开发线为 `0.8.24`,最新稳定 tag 为 `v0.8.0`。版本变化见 [更新日志](../CHANGELOG.md);旧版本原始文档可切换到对应 Git tag 查看。

> [!WARNING]
> 部分命令会连接并控制真实仪器。示例会区分离线检查、连接读取和硬件写入;执行写入前,应确认接线和限制值。
Expand Down
2 changes: 1 addition & 1 deletion docs/README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[中文文档](README.md) · English

WaveBench is a Python measurement bench for laboratory debugging. It combines explicit instrument commands, run plans, capture packages, and offline reports. It requires Python 3.11 or newer. The current development line is `0.8.22`; the latest stable tag is `v0.8.0`.
WaveBench is a Python measurement bench for laboratory debugging. It combines explicit instrument commands, run plans, capture packages, and offline reports. It requires Python 3.11 or newer. The current development line is `0.8.24`; the latest stable tag is `v0.8.0`.

> [!WARNING]
> Some commands connect to and change real instruments. Check wiring, input impedance, output state, and voltage/current limits before running a hardware action.
Expand Down
3 changes: 3 additions & 0 deletions docs/project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
## rfcs:接口提案与决策

- [RFC 索引](rfcs/README.md)
- [Source V2 能力、状态与复合输出安全 RFC](rfcs/WaveBench_source能力状态与复合输出安全RFC.md):
`Accepted R6`;核心 `0.8.24` 开发线已实现 P0、M1–M4、M4.5、C1、M5-A 至 M5-D 与 C2,
M6-A、M6-B 与 M6-C 已完成核心离线合同;真实插件验收与发布审计仍按里程碑推进。
- [transport 重放与 session 健康 RFC](rfcs/WaveBench_transport重放与session健康RFC.md)

## contributing:开发和接入
Expand Down
97 changes: 97 additions & 0 deletions docs/project/contributing/WaveBench_插件开发指南.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,103 @@ capability 名必须与 `kind` 同前缀。例如 scope 只能声明 `scope.*`
未采用新增 capability 的旧插件不需要提高核心版本下限。旧 `scope capture --screenshot` 不承载
新 `scope.screenshot_v2`;新插件应使用独立截图 Service 或 `wavebench scope screenshot capture`。

### 采用 Source V2 扩展

准备提供完整信号源状态快照时,先阅读
[Source V2 能力、状态与复合输出安全 RFC](../rfcs/WaveBench_source能力状态与复合输出安全RFC.md)。
只读 snapshot 采用条件如下:

- wheel 依赖和 descriptor 均要求 WaveBench `0.8.24` 或更高的 `0.8.x` 版本;
- descriptor 追加 `source_extensions`,显式声明 topology、read feature profile 和 pure-read query contract;
- driver 实现 `execute_source_query_plan_v2(plan)`,返回 `SourceQueryExecutionRecord`;
- 插件负责具体协议、合法查询顺序和解析,核心负责 semantic plan、availability、runtime narrowing 和 consistency;
- fake transport 覆盖组合响应、标量查询、activation、语义缺字段、query limit、deadline 和传输异常;
- descriptor 导入、snapshot 和 capability 校验均不得写入仪器、触发、切换输出或消费状态。

`source_extensions` 不能单独启用能力,必须同时声明 `source.snapshot_v2`。未声明该能力的旧插件
继续走 Source V1。

基础写能力使用 `source.basic_configure_v2` 与 `source.output_v2`;它们的写入 contract、fresh snapshot、
回读与失败恢复都由核心 Service 组织。Harmonic 预设配置使用独立的
`source.harmonics_configure_v2`,driver 必须实现 `configure_source_harmonics_v2(request)`,且 descriptor 必须
声明 Harmonic `READ`/`CONFIGURE`、可配置 order 区间、允许预设,以及 configured order、preset 与输出状态
可读。该 capability 只覆盖 `all`、`even`、`odd` 预设,不得借此支持 USER mask、逐分量幅度/相位或隐式输出 ON。

Harmonic 关闭使用独立的 `source.harmonics_disable_v2`,driver 必须实现
`disable_source_harmonics_v2(request)`。descriptor 必须声明同一通道的 Harmonic `READ`/`DISABLE` 与 output
state readback;request 只有 channel,结果和独立回读都必须证明 Harmonic、输出均为 OFF。它不能作为隐式
basic reset,也不要求 order 或 preset readback。

内部 AM 使用独立的 `source.modulation_configure_v2`,driver 必须实现
`configure_source_modulation_v2(request)`。descriptor 必须声明 Modulation `READ`/`CONFIGURE`、`am`、
`internal`、`depth_percent` 和 `configuration_readable = true`,并能回读同一 channel 的 output state。
该 capability 只覆盖输出 OFF 时的内部正弦 AM:深度为 `[0, 100]`,内部频率为有限正值;不得借此支持
disable、外部调制源、内部波形选择、FM/PM/PWM 或隐式输出 ON。

内部 PM 使用独立的 `source.modulation_pm_configure_v2`,driver 必须实现
`configure_source_pm_modulation_v2(request)`。descriptor 必须声明 Modulation `READ`/`CONFIGURE`、`pm`、
`internal`、`phase_deviation_deg` 和 `configuration_readable = true`,并能回读同一 channel 的 output state。
该 capability 只覆盖输出 OFF 时的内部正弦 PM:相位偏差为 `[0, 360]`,内部频率为有限正值;不得借此支持
disable、外部调制源、内部波形选择、AM/FM/PWM 或隐式输出 ON。

内部 FM 使用独立的 `source.modulation_fm_configure_v2`,driver 必须实现
`configure_source_fm_modulation_v2(request)`。descriptor 必须声明 Modulation `READ`/`CONFIGURE`、`fm`、
`internal`、`frequency_deviation_hz` 和 `configuration_readable = true`,并能回读同一 channel 的 output state。
该 capability 只覆盖输出 OFF 时的内部正弦 FM:frequency deviation 与内部频率均为有限正值;不得借此支持
disable、外部调制源、内部波形选择、AM/PM/PWM 或隐式输出 ON。

内部 PWM 使用独立的 `source.modulation_pwm_configure_v2`,driver 必须实现
`configure_source_pwm_modulation_v2(request)`。descriptor 必须声明 Modulation `READ`/`CONFIGURE`、`pwm`、
`internal`、`configuration_readable = true`,且 `parameter_kinds` 至少包含 `duty_deviation_percent` 或
`width_deviation_s` 之一,并能回读同一 channel 的 output state。该 capability 只覆盖输出 OFF 时的内部正弦 PWM:
request 包含有限正值的内部频率,以及恰好一个分支——`[0, 50]` 的 DUTY deviation 或 `[0, 500000]` 秒的 WIDTH
deviation;不得借此支持 disable、外部调制源、内部波形选择、AM/FM/PM 或隐式输出 ON。

内部 Sweep 使用独立的 `source.sweep_configure_v2`,driver 必须实现
`configure_source_sweep_v2(request)`。descriptor 必须声明 Sweep `READ`/`CONFIGURE`、至少一个 spacing、internal
trigger、timing/marker 与 `configuration_readable = true`;同一 channel 的 Basic `READ` 必须声明 `sweep` frequency
mode,Output `READ` 也必须能够回读 output state。该 capability 只覆盖输出 OFF 时的内建 Sweep:request 包含 start/stop、一个已声明的
spacing、`[2, 2048]` 的 steps 和 `[0.001, 300]` 秒的 sweep time;不得借此支持 center/span、marker、外部/手动 trigger、
arm、fire、输出 ON 或返回固定频率。

内部 Triggered Burst 使用独立的 `source.burst_configure_v2`,driver 必须实现
`configure_source_burst_v2(request)`。descriptor 必须声明 Burst `READ`/`CONFIGURE`、`triggered`、`internal`、
`timing_readable = true` 和 `triggered_internal_configuration_readable = true`,并能回读同一 channel 的 output state。
该 capability 只覆盖输出 OFF 时的 enabled internal Triggered Burst:request 包含 cycles、phase、internal period 与 delay;
不得借此支持 Gated、Infinity、外部/手动 trigger、arm、fire、输出 ON 或隐式恢复。

WIDTH Pulse 使用独立的 `source.pulse_configure_v2`,driver 必须实现
`configure_source_pulse_v2(request)`。descriptor 必须声明 Pulse `READ`/`CONFIGURE`、WIDTH hold、
delay 与 transition 可读,以及 `width_configuration_readable = true`,并能回读同一 channel 的 output state。
该 capability 只覆盖输出 OFF 时的完整 WIDTH 形状:width 不小于 `4 ns`,delay 为有限非负值,两个 transition
为有限正值且各自不超过 width 的 `0.625` 倍;不得借此支持 DUTY hold、partial patch、trigger、输出 ON 或隐式波形切换。

ARB storage 与 selection 分别使用 `source.arbitrary_storage_v2` 和 `source.arbitrary_select_v2`。storage driver
必须同时实现 `read_source_arbitrary_storage_v2(channel, slot_id)` 与
`mutate_source_arbitrary_storage_v2(request, payload)`;前者返回指定命名槽位的 exists、SHA-256 与大小,后者必须在
设备侧以 create-only 或 compare-and-replace 语义执行单次 mutation。payload 只作为独立 `bytes` 参数传递,不能进入
request、descriptor evidence 或 operation artifact。声明 storage capability 的 ARB profile 必须显式给出
`storage_slot_metadata_readable`、`storage_write_modes` 与 `storage_max_payload_bytes`,并能回读 selection 与 output state。
storage 不选择波形、不改变输出,也不要求其它独立端口关闭。

selection driver 实现 `select_source_arbitrary_v2(request)`。descriptor 必须声明 ARB `READ`/`CONFIGURE`、可读的
selection 与 storage digest、允许 playback mode;true-ARB 还要求 sample rate 可读,Basic 必须支持可读的
`arbitrary` waveform,Output 必须能回读 state。DDS 只接受 playback frequency,true-ARB 只接受 sample rate;
selection 只允许目标输出 OFF,完成后仍为 OFF,不会隐式 ON。声明任一 ARB V2 capability 后,V1
`upload_arbitrary_waveform` 会在本地文件读取和仪器 I/O 前被拒绝,不能把混合 upload/selection/ON 的旧 route 部分映射。

跨通道 Combine、Coupling、Tracking 和相位关系分别使用 `source.combine_configure_v2`、
`source.coupling_configure_v2`、`source.tracking_configure_v2` 与 `source.phase_relation_configure_v2`。每项都使用
独立 driver method,request 只包含递增且唯一的 channel set 与 enabled state。descriptor 必须为该 relation 的
channel set 声明 `READ`/`CONFIGURE`,在 `SourceCrossChannelCapabilityProfile` 中列出 relation kind、支持的 channel set 和
`configuration_readable = true`;同 feature 还必须有 instrument-scope 的纯读 relation graph facet。
核心只要求 graph 展开后实际受影响的端口 OFF,未连通的独立端口可以继续 ON。driver result 必须回读 relation 与每个
受影响端口的 OFF 状态;无法证明 graph、端口范围或 readback 时不得声明此 capability。声明 Coupling V2 后,V1
`configure_coupling` 在 I/O 前拒绝;声明任一这四项 capability 后,V1 restore 也在 I/O 前拒绝。

实际插件声明任一 Source V2 写 capability 前,至少完成该 capability 的 A0 离线 fixture;声明的方向、profile、
方法与版本门必须同时通过核心校验。没有实机证据时,不得把核心合同注册描述为已完成设备写能力验收。

## 配置 options

插件私有配置放在对应的 `[<kind>.options]` 表中,并为每个键定义 `OptionSpec`。适合 `OptionSpec` 的内容包括分块点数、插件专用超时和明确枚举;resource、backend、通用 timeout、安全限制和输出状态仍由核心配置管理。
Expand Down
25 changes: 24 additions & 1 deletion docs/project/guides/WaveBench_CLI形态.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ wavebench run --help
| 类别 | 示例 | 行为 |
|---|---|---|
| 离线 | `run schema`、`run template`、`run check`、`run intent`、`run report`、`run compare`、`run resume`、`capability explain`、`lock status`、`capture inspect`、`tui --fake` | 不连接仪器;报告、比较、检查、能力解释、锁查询和意图生成只读取本地文件 |
| 连接读取 | `doctor`、`net`、`scope idn`、`scope status`、`run verify` | 查询资源、身份或状态,不应修改实验设置 |
| 连接读取 | `doctor`、`net`、`scope idn`、`scope status`、`source snapshot-v2`、`run verify` | 查询资源、身份或状态,不应修改实验设置 |
| 显式写入或触发 | `scope auto`、`scope fetch/capture`、source / power setter、`run plan` | 可能改变设置、触发采集或切换输出 |

执行硬件写入前,应先确认接线、输入阻抗、输出状态和安全限制。CLI 不会自动发送 `*RST`,也不会因为设置电压或幅度而自动打开输出。
Expand Down Expand Up @@ -68,6 +68,29 @@ wavebench capability explain source.output --candidates --json

`--candidates` 只筛选当前本地 registry 中的驱动,不安装、不下载插件。

完整的只读信号源状态使用:

```bash
wavebench source snapshot-v2 --config wavebench.toml
wavebench --json source snapshot-v2 --config wavebench.toml
```

该命令要求插件声明 `source.snapshot_v2`,按 descriptor topology 查询全部通道、输入和跨通道
关系,不接受单通道或 raw query 参数。普通模式输出缩进 JSON;`--json` 使用
`wavebench.cli.result.v1` envelope。命令不授权任何 Source V2 写入。

已声明对应写 capability 的插件还可以配置跨通道关系:

```bash
wavebench source combine-configure-v2 --channel 1 --channel 2 on --config wavebench.toml
wavebench source coupling-configure-v2 --channel 1 --channel 2 off --config wavebench.toml
wavebench source tracking-configure-v2 --channel 1 --channel 2 on --config wavebench.toml
wavebench source phase-relation-configure-v2 --channel 1 --channel 2 on --config wavebench.toml
```

`--channel` 必须重复给出至少两个递增且唯一的参与端口。核心只要求 relation graph 展开后的受影响端口为 OFF;
没有连通关系的其它端口可以继续 ON。命令不设置厂商私有联动参数,也不开启输出。

`--json` 可以放在命令行任意位置。非交互命令输出 `wavebench.cli.result.v1`;错误输出
`wavebench.error.v1`,诊断信息写入 stderr。TUI 和 HTTP MCP 不使用 one-shot JSON 包装。

Expand Down
Loading
Loading