aura-basetools 0.13.1 → 0.13.3
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/README.md +40 -42
- package/bin/aura-mcp.mjs +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# aura-basetools 0.13.
|
|
1
|
+
# aura-basetools 0.13.3
|
|
2
2
|
|
|
3
3
|
Byte-exact file tools for coding agents: read by intent, edit by intent, and write whole files without corrupting bytes. One engine shared by a standalone CLI and an MCP server.
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ The engine is intentionally not a general file manager: it reads and edits UTF-8
|
|
|
21
21
|
### Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm i -g aura-basetools@0.13.
|
|
24
|
+
npm i -g aura-basetools@0.13.3
|
|
25
25
|
aura --version
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -84,29 +84,28 @@ The server exposes:
|
|
|
84
84
|
|
|
85
85
|
The older tool names (`aura_read`, `aura_edit`, `aura_write`, ...) are no longer exposed by MCP or DSH.
|
|
86
86
|
|
|
87
|
-
###
|
|
87
|
+
### Why aura-basetools
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Compared with the DSH built-in `dsh-tool-fs` tools, the differences are deliberate:
|
|
90
90
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
- **Byte fidelity, not text normalization.** Leading BOM and per-line endings are preserved; only the addressed bytes change. The byte-fidelity suite asserts this with 102 checks.
|
|
92
|
+
- **Read by intent, not whole file.** `map` / `digest` / `lines` / `search` return the structural slice you ask for; the customer comparison measured about 1/24 of the context for the same file.
|
|
93
|
+
- **Edits refuse stale bases.** A region-level gate rejects an edit when the addressed region changed after the read that authorized it, and points at the lines to re-read; `expect` makes the intended text explicit.
|
|
94
|
+
- **Writes are verified, not assumed.** Every write goes through a temp file, flush, rename, and a byte-for-byte read-back; multi-target edits plan first and write nothing if any target fails.
|
|
95
|
+
- **Addressing is structural.** `target` / `lines` / `old` / `expect` / handles replace "copy the literal text exactly"; failure receipts include ready-to-use retry addresses.
|
|
96
|
+
- **The core is DSH-free.** `aura-basetools` has no runtime dependencies and no DSH imports; the DSH adapter is a separate optional package.
|
|
97
|
+
|
|
98
|
+
Scope note: the byte-level comparison is against the DSH built-in tools. Other clients may already preserve BOM/CRLF (for example ZCode's built-in `Edit`); do not generalize this comparison to every editor.
|
|
99
99
|
|
|
100
|
-
|
|
100
|
+
### Verification
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
- Leading BOM and per-line endings are preserved.
|
|
104
|
-
- Writes go through a temporary file, flush, rename, and a byte-for-byte read-back check.
|
|
105
|
-
- A region-level stale gate and an optional strict read-before-write policy reject edits whose basis changed.
|
|
106
|
-
- Write transactions record original bytes, support rollback/undo, and reject undo when a file changed after the transaction.
|
|
107
|
-
- Multi-target writes plan first; if planning fails, no file is written.
|
|
102
|
+
The release gate is the source of truth:
|
|
108
103
|
|
|
109
|
-
|
|
104
|
+
```bash
|
|
105
|
+
node build/release-check.mjs
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
It runs the full suite set, range fixtures, packaged tests, split-package install, and consistency checks. Exact counts and pass/fail are recorded in the GitHub release notes; they are not copied here, so they cannot go stale.
|
|
110
109
|
|
|
111
110
|
### Boundaries
|
|
112
111
|
|
|
@@ -137,7 +136,7 @@ MIT.
|
|
|
137
136
|
### 安装
|
|
138
137
|
|
|
139
138
|
```bash
|
|
140
|
-
npm i -g aura-basetools@0.13.
|
|
139
|
+
npm i -g aura-basetools@0.13.3
|
|
141
140
|
aura --version
|
|
142
141
|
```
|
|
143
142
|
|
|
@@ -200,29 +199,28 @@ npx -y --package aura-basetools aura basetools mcp
|
|
|
200
199
|
|
|
201
200
|
旧工具名(`aura_read`、`aura_edit`、`aura_write` 等)不再由 MCP/DSH 暴露。
|
|
202
201
|
|
|
203
|
-
###
|
|
202
|
+
### 为什么是 aura-basetools
|
|
204
203
|
|
|
205
|
-
|
|
204
|
+
与 DSH 内置 `dsh-tool-fs` 相比,差异是刻意设计的:
|
|
206
205
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
Linux CI 已配置,但本机 0.13.0 发布闸是 Windows 实跑;不能据此声称 Linux 已通过。
|
|
206
|
+
- **字节保真,不做文本归一化。** 保留前导 BOM 与逐行行尾,只改被寻址的字节;字节保真套件用 102 条断言守着。
|
|
207
|
+
- **按意图读,不读整份。** `map` / `digest` / `lines` / `search` 只返回你要的结构切片;客户版对照实测同一文件上下文约 1/24。
|
|
208
|
+
- **依据过期就拒绝。** 区域级陈旧闸门在“授权读取之后该区域被改过”时拒绝,并指出重读哪几行;`expect` 让目标原文显式化。
|
|
209
|
+
- **写完要验,不靠相信。** 每次写盘走临时文件、flush、rename,再做逐字节回读;多目标先全量规划,任一失败则一个字节都不写。
|
|
210
|
+
- **寻址是结构化的。** `target` / `lines` / `old` / `expect` / 句柄替代“把原文一字不差抄对”;失败回执带可直接用的重试地址。
|
|
211
|
+
- **核心不依赖 DSH。** `aura-basetools` 零运行时依赖、无 DSH import;DSH 适配器是独立可选包。
|
|
212
|
+
|
|
213
|
+
范围说明:字节级对照的对象是 DSH 内置工具;其他客户端可能本来就保留 BOM/CRLF(例如 ZCode 内置 `Edit`),不要把该对照泛化到所有编辑器。
|
|
214
|
+
|
|
215
|
+
### 验证
|
|
216
|
+
|
|
217
|
+
发布闸是唯一事实源:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
node build/release-check.mjs
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
它跑完整套件、三套靶场、包内验收、拆包安装与一致性检查。本次发布的精确读数与通过/失败记录在 GitHub Release notes 里,本文不手抄,避免过期。
|
|
226
224
|
|
|
227
225
|
### 边界
|
|
228
226
|
|
package/bin/aura-mcp.mjs
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* aura_basetools_transactions 列出当前工作区写事务
|
|
14
14
|
*
|
|
15
15
|
* 接法(写进各家的 MCP 配置即可):
|
|
16
|
-
* codex: codex mcp add aura -- npx -y --package aura-basetools aura mcp
|
|
17
|
-
* claude code: claude mcp add aura -- npx -y --package aura-basetools aura mcp
|
|
18
|
-
* cursor/zed: command = "npx", args = ["-y", "--package", "aura-basetools", "aura", "mcp"]
|
|
16
|
+
* codex: codex mcp add aura -- npx -y --package aura-basetools aura basetools mcp
|
|
17
|
+
* claude code: claude mcp add aura -- npx -y --package aura-basetools aura basetools mcp
|
|
18
|
+
* cursor/zed: command = "npx", args = ["-y", "--package", "aura-basetools", "aura", "basetools", "mcp"]
|
|
19
19
|
*
|
|
20
20
|
* 为什么必须带 `--package`:本包有两个 bin(`aura` / `aura-mcp`),**没有**一个叫
|
|
21
21
|
* `aura-basetools`;npx 在"多个 bin 且没有与包名同名的"时候会拒绝猜,直接报
|
|
@@ -559,7 +559,7 @@ export async function serve() {
|
|
|
559
559
|
await chain
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
-
// 直接运行本文件(`aura-mcp`,package.json 里声明的第二个 bin)也要起服务,与 `aura mcp` 等价。
|
|
562
|
+
// 直接运行本文件(`aura-mcp`,package.json 里声明的第二个 bin)也要起服务,与 `aura basetools mcp` 等价。
|
|
563
563
|
// 用 pathToFileURL 比手拼 file:// 靠得住(Windows 盘符就是那种手拼会踩的地方)。
|
|
564
564
|
if (process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
565
565
|
await serve()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aura-basetools",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "Byte-exact read, edit and write tools for coding agents. Standalone CLI and MCP server; no DSH required. 面向 coding agent 的逐字节读写工具;独立 CLI / MCP,可选 DSH 适配器。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|