dsh-bus 1.3.1 → 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 +28 -0
- package/LICENSE +134 -21
- package/README.md +21 -12
- package/README.zh-CN.md +14 -8
- package/dsh-bundle/docs/DETAIL.md +3 -3
- package/dshbus.py +5 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ 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
|
+
|
|
24
|
+
## [1.4.0] — 2026-11-17
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
|
|
28
|
+
- **License: MIT → PolyForm Noncommercial 1.0.0.** Noncommercial use
|
|
29
|
+
(personal, educational, research) remains free; commercial use now requires
|
|
30
|
+
a separate license from the author. Copyright line now names taojun566.
|
|
31
|
+
- Versions 1.3.1 and earlier were distributed under MIT and those already
|
|
32
|
+
distributed copies remain under MIT (license grants are not retroactively
|
|
33
|
+
revocable); all later releases are PolyForm NC.
|
|
34
|
+
|
|
7
35
|
## [1.3.0] — 2026-11-17
|
|
8
36
|
|
|
9
37
|
First public release. Reference implementation of the L1 file-mailbox bus
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# PolyForm Noncommercial License 1.0.0
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 taojun566 <https://github.com/taojun566>
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/noncommercial/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree
|
|
10
|
+
to them as both strict obligations and conditions to all
|
|
11
|
+
your licenses.
|
|
12
|
+
|
|
13
|
+
## Copyright License
|
|
14
|
+
|
|
15
|
+
The licensor grants you a copyright license for the
|
|
16
|
+
software to do everything you might do with the software
|
|
17
|
+
that would otherwise infringe the licensor's copyright
|
|
18
|
+
in it for any permitted purpose. However, you may
|
|
19
|
+
only distribute the software according to [Distribution
|
|
20
|
+
License](#distribution-license) and make changes or new works
|
|
21
|
+
based on the software according to [Changes and New Works
|
|
22
|
+
License](#changes-and-new-works-license).
|
|
23
|
+
|
|
24
|
+
## Distribution License
|
|
25
|
+
|
|
26
|
+
The licensor grants you an additional copyright license
|
|
27
|
+
to distribute copies of the software. Your license
|
|
28
|
+
to distribute covers distributing the software with
|
|
29
|
+
changes and new works permitted by [Changes and New Works
|
|
30
|
+
License](#changes-and-new-works-license).
|
|
31
|
+
|
|
32
|
+
## Notices
|
|
33
|
+
|
|
34
|
+
You must ensure that anyone who gets a copy of any part of
|
|
35
|
+
the software from you also gets a copy of these terms or the
|
|
36
|
+
URL for them above, as well as copies of any plain-text lines
|
|
37
|
+
beginning with `Required Notice:` that the licensor provided
|
|
38
|
+
with the software. For example:
|
|
39
|
+
|
|
40
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
41
|
+
|
|
42
|
+
## Changes and New Works License
|
|
43
|
+
|
|
44
|
+
The licensor grants you an additional copyright license to
|
|
45
|
+
make changes and new works based on the software for any
|
|
46
|
+
permitted purpose.
|
|
47
|
+
|
|
48
|
+
## Patent License
|
|
49
|
+
|
|
50
|
+
The licensor grants you a patent license for the software that
|
|
51
|
+
covers patent claims the licensor can license, or becomes able
|
|
52
|
+
to license, that you would infringe by using the software.
|
|
53
|
+
|
|
54
|
+
## Noncommercial Purposes
|
|
55
|
+
|
|
56
|
+
Any noncommercial purpose is a permitted purpose.
|
|
57
|
+
|
|
58
|
+
## Personal Uses
|
|
59
|
+
|
|
60
|
+
Personal use for research, experiment, and testing for
|
|
61
|
+
the benefit of public knowledge, personal study, private
|
|
62
|
+
entertainment, hobby projects, amateur pursuits, or religious
|
|
63
|
+
observance, without any anticipated commercial application,
|
|
64
|
+
is use for a permitted purpose.
|
|
65
|
+
|
|
66
|
+
## Noncommercial Organizations
|
|
67
|
+
|
|
68
|
+
Use by any charitable organization, educational institution,
|
|
69
|
+
public research organization, public safety or health
|
|
70
|
+
organization, environmental protection organization,
|
|
71
|
+
or government institution is use for a permitted purpose
|
|
72
|
+
regardless of the source of funding or obligations resulting
|
|
73
|
+
from the funding.
|
|
74
|
+
|
|
75
|
+
## Fair Use
|
|
76
|
+
|
|
77
|
+
You may have "fair use" rights for the software under the
|
|
78
|
+
law. These terms do not limit them.
|
|
79
|
+
|
|
80
|
+
## No Other Rights
|
|
81
|
+
|
|
82
|
+
These terms do not allow you to sublicense or transfer any of
|
|
83
|
+
your licenses to anyone else, or prevent the licensor from
|
|
84
|
+
granting licenses to anyone else. These terms do not imply
|
|
85
|
+
any other licenses.
|
|
86
|
+
|
|
87
|
+
## Patent Defense
|
|
88
|
+
|
|
89
|
+
If you make any written claim that the software infringes or
|
|
90
|
+
contributes to infringement of any patent, your patent license
|
|
91
|
+
for the software granted under these terms ends immediately. If
|
|
92
|
+
your company makes such a claim, your patent license ends
|
|
93
|
+
immediately for work on behalf of your company.
|
|
94
|
+
|
|
95
|
+
## Violations
|
|
96
|
+
|
|
97
|
+
The first time you are notified in writing that you have
|
|
98
|
+
violated any of these terms, or done anything with the software
|
|
99
|
+
not covered by your licenses, your licenses can nonetheless
|
|
100
|
+
continue if you come into full compliance with these terms,
|
|
101
|
+
and take practical steps to correct past violations, within
|
|
102
|
+
32 days of receiving notice. Otherwise, all your licenses
|
|
103
|
+
end immediately.
|
|
104
|
+
|
|
105
|
+
## No Liability
|
|
106
|
+
|
|
107
|
+
***As far as the law allows, the software comes as is, without
|
|
108
|
+
any warranty or condition, and the licensor will not be liable
|
|
109
|
+
to you for any damages arising out of these terms or the use
|
|
110
|
+
or nature of the software, under any kind of legal claim.***
|
|
111
|
+
|
|
112
|
+
## Definitions
|
|
113
|
+
|
|
114
|
+
The **licensor** is the individual or entity offering these
|
|
115
|
+
terms, and the **software** is the software the licensor makes
|
|
116
|
+
available under these terms.
|
|
117
|
+
|
|
118
|
+
**You** refers to the individual or entity agreeing to these
|
|
119
|
+
terms.
|
|
120
|
+
|
|
121
|
+
**Your company** is any legal entity, sole proprietorship,
|
|
122
|
+
or other kind of organization that you work for, plus all
|
|
123
|
+
organizations that have control over, are under the control of,
|
|
124
|
+
or are under common control with that organization. **Control**
|
|
125
|
+
means ownership of substantially all the assets of an entity,
|
|
126
|
+
or the power to direct its management and policies by vote,
|
|
127
|
+
contract, or otherwise. Control can be direct or indirect.
|
|
128
|
+
|
|
129
|
+
**Your licenses** are all the licenses granted to you for the
|
|
130
|
+
software under these terms.
|
|
131
|
+
|
|
132
|
+
**Use** means anything you do with the software requiring one
|
|
133
|
+
of your licenses.
|
|
134
|
+
|
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
|
|
|
@@ -71,6 +74,12 @@ scripts/ smoke consumer example
|
|
|
71
74
|
|
|
72
75
|
## License
|
|
73
76
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
+
[PolyForm Noncommercial 1.0.0](./LICENSE) © 2026 taojun566.
|
|
78
|
+
|
|
79
|
+
Free for personal, educational, research and other noncommercial use.
|
|
80
|
+
**Commercial use requires a separate license** — open a
|
|
81
|
+
[GitHub issue](https://github.com/taojun566/dsh-bus/issues) to ask.
|
|
82
|
+
Versions 1.3.1 and earlier were distributed under MIT; those copies remain
|
|
83
|
+
under MIT.
|
|
84
|
+
|
|
85
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
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
|
## 已知边界(投产前清单,不阻塞窗口间日常使用)
|
|
@@ -103,6 +103,12 @@ dshbus --from window-b --root <root> ack <消息id> --result '<json>'
|
|
|
103
103
|
- 掉电持久性未验证(Windows 无目录 fsync);TOCTOU 检查-使用窗口在册
|
|
104
104
|
- 会话生命周期与接管方判定由上层约定(协议 §6)
|
|
105
105
|
|
|
106
|
-
|
|
106
|
+
## 许可证
|
|
107
|
+
|
|
108
|
+
[PolyForm Noncommercial 1.0.0](./LICENSE) © 2026 taojun566。
|
|
109
|
+
|
|
110
|
+
个人、学习、研究及其他**非商业用途免费使用**;**商业使用需另行获得授权**——请开
|
|
111
|
+
[GitHub issue](https://github.com/taojun566/dsh-bus/issues) 洽谈。1.3.1 及更早版本以
|
|
112
|
+
MIT 发布,已发出的那些副本仍按 MIT。
|
|
107
113
|
|
|
108
114
|
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
@@ -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,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-bus",
|
|
3
|
-
"version": "1.
|
|
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
|
-
"license": "
|
|
5
|
+
"license": "PolyForm-Noncommercial-1.0.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/taojun566/dsh-bus.git"
|