dsh-bus 1.4.0 → 1.4.1
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/CHANGELOG.md +17 -0
- package/README.md +12 -9
- package/README.zh-CN.md +7 -7
- package/dsh-bundle/docs/DETAIL.md +3 -3
- package/dshbus.py +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [1.4.1] — 2026-11-17
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Documentation accuracy audit (every published byte re-verified): removed the
|
|
12
|
+
PyPI `pip install dsh-bus` promise (no PyPI release exists) — the real
|
|
13
|
+
install paths are `python dshbus.py` in place, `npx -y dsh-bus` (MCP), or
|
|
14
|
+
`pip install git+https://github.com/taojun566/dsh-bus.git`.
|
|
15
|
+
- `pyproject.toml` declared `dshbus = "dshbus:main"` but no `main` existed —
|
|
16
|
+
added `dshbus.main()`; pip-installed `dshbus` command now works.
|
|
17
|
+
- `pyproject.toml` stale metadata: version 1.3.0 → 1.4.1, license reference
|
|
18
|
+
switched from MIT to the shipped PolyForm NC `LICENSE` file; MIT classifier
|
|
19
|
+
removed.
|
|
20
|
+
- Removed internal release-runbook file (contained local machine paths) from
|
|
21
|
+
the public repository; removed dead references to non-shipped internal
|
|
22
|
+
docs; corrected an overstated "dual-OS CI matrix" claim.
|
|
23
|
+
|
|
7
24
|
## [1.4.0] — 2026-11-17
|
|
8
25
|
|
|
9
26
|
### Changed
|
package/README.md
CHANGED
|
@@ -16,23 +16,26 @@ window knows*, *wait for another window*, and *relay work between windows*.
|
|
|
16
16
|
|
|
17
17
|
## Install
|
|
18
18
|
|
|
19
|
+
No install step required:
|
|
20
|
+
|
|
19
21
|
```bash
|
|
20
|
-
|
|
21
|
-
pip install
|
|
22
|
+
python dshbus.py --help # CLI — core bus, stdlib only, Python >= 3.10
|
|
23
|
+
pip install git+https://github.com/taojun566/dsh-bus.git # optional: installs dshbus / dshbus-mcp commands
|
|
24
|
+
npx -y dsh-bus # MCP server over stdio, for DSH/agent hosts
|
|
22
25
|
```
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
`dshbus.py` is a single file; copy it next to your script or call it in place.
|
|
25
28
|
|
|
26
29
|
## Quick start (two terminals)
|
|
27
30
|
|
|
28
31
|
```bash
|
|
29
32
|
# Window A: send a task, then wait for the receipt
|
|
30
|
-
dshbus --from window-a send window-b task '{"job":"analyze","file":"x.py"}' --corr t1
|
|
31
|
-
dshbus --from window-a wait t1 --deadline 600
|
|
33
|
+
python dshbus.py --from window-a send window-b task '{"job":"analyze","file":"x.py"}' --corr t1
|
|
34
|
+
python dshbus.py --from window-a wait t1 --deadline 600
|
|
32
35
|
|
|
33
36
|
# Window B: claim, do the work, acknowledge with the receipt
|
|
34
|
-
dshbus --from window-b recv
|
|
35
|
-
dshbus --from window-b ack <mid> --result '{"corr":"t1","status":"done"}'
|
|
37
|
+
python dshbus.py --from window-b recv
|
|
38
|
+
python dshbus.py --from window-b ack <mid> --result '{"corr":"t1","status":"done"}'
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
Mailboxes live under `~/.dsh/windowbus/<name>/{inbox,claimed,acks,dead,blobs}`.
|
|
@@ -56,8 +59,8 @@ relayed a task end-to-end purely through the MCP tool surface).
|
|
|
56
59
|
| Poison safety | malformed JSON or symlinked/hardlinked payloads go to `dead/` with a reason |
|
|
57
60
|
| Hardening | path-traversal / reserved device names / reparse-point (junction) directories / dangling-surrogate guards |
|
|
58
61
|
|
|
59
|
-
Full spec: see `CHANGELOG.md` and the test suite (25 pytest locks +
|
|
60
|
-
|
|
62
|
+
Full spec: see `CHANGELOG.md` and the test suite (25 pytest locks +
|
|
63
|
+
8×25 concurrent-producer zero-loss lock + real stdio MCP smoke).
|
|
61
64
|
|
|
62
65
|
## Repo layout
|
|
63
66
|
|
package/README.zh-CN.md
CHANGED
|
@@ -39,7 +39,7 @@ python dshbus.py gc # 清理 tmp / 过期 ack / 无引用 blob
|
|
|
39
39
|
| 公共队列 | 多个 worker 竞争同一信箱 `recv()` | link-claim 同名墓碑,恰一赢家 |
|
|
40
40
|
| 广播 | 循环 `send` 到每个信箱 | 每接收者一份副本 |
|
|
41
41
|
|
|
42
|
-
##
|
|
42
|
+
## 可靠性规则(实测背书)
|
|
43
43
|
|
|
44
44
|
- **原子提交**:tmp + fsync + `os.replace`;生产者崩溃只留 tmp,不污染 committed
|
|
45
45
|
- **claim = `os.link` 争抢**(Windows 上 rename 有内核级双赢竞态,link 输家必得
|
|
@@ -73,15 +73,15 @@ python -X utf8 scripts/smoke_e2e.py # 真实双进程 E2E(10/10 无丢
|
|
|
73
73
|
|
|
74
74
|
```powershell
|
|
75
75
|
# 窗口 A(发起方):发任务 + 等回执
|
|
76
|
-
dshbus --from window-a --root <root> send window-b task '<json>' --corr job-1
|
|
77
|
-
dshbus --from window-a --root <root> wait job-1 --deadline 300
|
|
76
|
+
python dshbus.py --from window-a --root <root> send window-b task '<json>' --corr job-1
|
|
77
|
+
python dshbus.py --from window-a --root <root> wait job-1 --deadline 300
|
|
78
78
|
|
|
79
79
|
# 窗口 B(消费方):循环 recv → 处理 → ack
|
|
80
|
-
dshbus --from window-b --root <root> recv --block --timeout 120 --limit 10
|
|
81
|
-
dshbus --from window-b --root <root> ack <消息id> --result '<json>'
|
|
80
|
+
python dshbus.py --from window-b --root <root> recv --block --timeout 120 --limit 10
|
|
81
|
+
python dshbus.py --from window-b --root <root> ack <消息id> --result '<json>'
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
实测纪律(2026-11-17
|
|
84
|
+
实测纪律(2026-11-17 双会话接力 E2E):
|
|
85
85
|
|
|
86
86
|
- **复杂 JSON 参数走临时脚本**:pwsh 内联 JSON 会被转义撕裂;且
|
|
87
87
|
PowerShell→原生程序传参会**剥掉内层双引号**(`--result '{"corr":…}'`
|
|
@@ -92,7 +92,7 @@ dshbus --from window-b --root <root> ack <消息id> --result '<json>'
|
|
|
92
92
|
推理开销远大于进程直跑);超时返回 null ≠ 失败,回执可能后到,
|
|
93
93
|
先 `status` + 查 `acks/` 再定论。
|
|
94
94
|
- 固定 `--from <窗口名>`,否则落到 `win-<pid>` 缺省信箱造成孤儿信箱。
|
|
95
|
-
-
|
|
95
|
+
- 真实活证:开发期 `.bus-e2e/` 保留现场(6 份 ack + _metrics.jsonl),
|
|
96
96
|
两窗口独立报告交叉对账一致(A 侧 ack 文件 vs B 侧收尾报告)。
|
|
97
97
|
|
|
98
98
|
## 已知边界(投产前清单,不阻塞窗口间日常使用)
|
|
@@ -32,6 +32,6 @@ a local file-mailbox bus (`~/.dsh/windowbus/`):
|
|
|
32
32
|
|
|
33
33
|
The bundle launches the MCP server through `npx -y dsh-bus@latest`, a tiny Node
|
|
34
34
|
launcher that spawns a Python ≥ 3.10 interpreter (probed automatically:
|
|
35
|
-
`DSHBUS_PYTHON` → `python3` → `python` → `py -3`; stdlib only). Alternative
|
|
36
|
-
|
|
37
|
-
`dshbus-mcp` console
|
|
35
|
+
`DSHBUS_PYTHON` → `python3` → `python` → `py -3`; stdlib only). Alternative:
|
|
36
|
+
`pip install git+https://github.com/taojun566/dsh-bus.git` installs the
|
|
37
|
+
`dshbus` CLI and the `dshbus-mcp` console scripts.
|
package/dshbus.py
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-bus",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Cross-window file-mailbox bus for DSH (and any process): send tasks, wait for receipts, relay work between agent sessions. Zero-dependency core, exactly-once claims, at-least-once delivery.",
|
|
5
5
|
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"repository": {
|