clawtool 0.1.6 → 0.1.8
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 +21 -8
- package/package.json +2 -2
- package/web/index.html +11 -8
package/README.md
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
# ClawTool
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OpenClaw 的纯本地诊断与修复工具。
|
|
4
|
+
Fully local diagnose and repair tool for OpenClaw.
|
|
4
5
|
|
|
5
6
|
## Run
|
|
6
7
|
|
|
8
|
+
运行:
|
|
9
|
+
Run:
|
|
10
|
+
|
|
7
11
|
```bash
|
|
8
12
|
npm install
|
|
9
13
|
npm run dev
|
|
10
14
|
```
|
|
11
15
|
|
|
16
|
+
CLI 参数:
|
|
12
17
|
CLI options:
|
|
13
18
|
|
|
14
|
-
- `--no-open`: do not auto-open browser
|
|
15
|
-
- `--port <number>`: force a specific port
|
|
19
|
+
- `--no-open`: 不自动打开浏览器 / do not auto-open browser
|
|
20
|
+
- `--port <number>`: 指定端口 / force a specific port
|
|
16
21
|
|
|
22
|
+
示例:
|
|
17
23
|
Example:
|
|
18
24
|
|
|
19
25
|
```bash
|
|
@@ -22,6 +28,9 @@ npm run dev -- --no-open --port 9527
|
|
|
22
28
|
|
|
23
29
|
## Build
|
|
24
30
|
|
|
31
|
+
构建与启动:
|
|
32
|
+
Build and start:
|
|
33
|
+
|
|
25
34
|
```bash
|
|
26
35
|
npm run build
|
|
27
36
|
npm start
|
|
@@ -29,14 +38,18 @@ npm start
|
|
|
29
38
|
|
|
30
39
|
## Health endpoint
|
|
31
40
|
|
|
41
|
+
本地服务提供:
|
|
32
42
|
The local server exposes:
|
|
33
43
|
|
|
34
44
|
- `GET /api/health`
|
|
35
45
|
|
|
36
46
|
## Current scope (v1 local)
|
|
37
47
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
-
|
|
48
|
+
当前范围(v1 本地版):
|
|
49
|
+
Current scope (v1 local):
|
|
50
|
+
|
|
51
|
+
- 仅本地观察与诊断 / Local observation only
|
|
52
|
+
- 确定性本地规则引擎 / Deterministic local rules
|
|
53
|
+
- 修复命令执行前需要确认 / Guided fix confirmation before command execution
|
|
54
|
+
- 单页中英双语界面 / Single-page bilingual UI (zh/en)
|
|
55
|
+
- 不依赖云端 API / No cloud API dependency
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawtool",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.8",
|
|
4
|
+
"description": "OpenClaw 纯本地诊断与修复工具 / Fully local OpenClaw diagnose and repair tool",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
package/web/index.html
CHANGED
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
<body>
|
|
156
156
|
<main class="app notranslate">
|
|
157
157
|
<section class="brand">
|
|
158
|
-
<div class="brand-tag" id="brand-tag">Local
|
|
158
|
+
<div class="brand-tag" id="brand-tag">Fully Local Diagnose Engine</div>
|
|
159
159
|
<h1>ClawTool</h1>
|
|
160
160
|
<p id="brand-sub">Detect and repair OpenClaw issues locally with explicit fix confirmation.</p>
|
|
161
161
|
</section>
|
|
@@ -163,10 +163,12 @@
|
|
|
163
163
|
<section id="start" class="card">
|
|
164
164
|
<div class="hint" id="start-text">No cloud call. No token required. Local execution only.</div>
|
|
165
165
|
<button id="btn-start" class="btn btn-main">Start Scan</button>
|
|
166
|
-
<button id="btn-rescan" class="btn btn-main hidden" style="margin-top:8px">Scan Again</button>
|
|
167
166
|
</section>
|
|
168
167
|
|
|
169
168
|
<section id="feed" class="feed hidden"></section>
|
|
169
|
+
<section id="actions" class="card hidden">
|
|
170
|
+
<button id="btn-rescan" class="btn btn-main">Scan Again</button>
|
|
171
|
+
</section>
|
|
170
172
|
</main>
|
|
171
173
|
|
|
172
174
|
<script>
|
|
@@ -174,7 +176,7 @@
|
|
|
174
176
|
const isZh = /^zh/i.test(navigator.language || '');
|
|
175
177
|
const T = isZh ? {
|
|
176
178
|
pageTitle: 'OpenClaw 修复助手',
|
|
177
|
-
tag: '
|
|
179
|
+
tag: '纯本地诊断引擎',
|
|
178
180
|
sub: '本地检测并修复 OpenClaw 问题,所有修复步骤都需你确认。',
|
|
179
181
|
startText: '不走云端,不需要 token,仅本地执行。',
|
|
180
182
|
start: '开始扫描',
|
|
@@ -191,7 +193,7 @@
|
|
|
191
193
|
}
|
|
192
194
|
} : {
|
|
193
195
|
pageTitle: 'OpenClaw Repair Assistant',
|
|
194
|
-
tag: 'Local
|
|
196
|
+
tag: 'Fully Local Diagnose Engine',
|
|
195
197
|
sub: 'Detect and repair OpenClaw issues locally with explicit fix confirmation.',
|
|
196
198
|
startText: 'No cloud call. No token required. Local execution only.',
|
|
197
199
|
start: 'Start Scan',
|
|
@@ -215,6 +217,7 @@
|
|
|
215
217
|
sub: document.getElementById('brand-sub'),
|
|
216
218
|
startText: document.getElementById('start-text'),
|
|
217
219
|
startWrap: document.getElementById('start'),
|
|
220
|
+
actionsWrap: document.getElementById('actions'),
|
|
218
221
|
btnStart: document.getElementById('btn-start'),
|
|
219
222
|
btnRescan: document.getElementById('btn-rescan'),
|
|
220
223
|
feed: document.getElementById('feed')
|
|
@@ -307,14 +310,14 @@
|
|
|
307
310
|
|
|
308
311
|
if (type === 'complete') {
|
|
309
312
|
addCard('<h3 class="ok">' + T.done + '</h3><p>' + (data.summary || '') + '</p>');
|
|
310
|
-
el.
|
|
313
|
+
el.actionsWrap.classList.remove('hidden');
|
|
311
314
|
if (eventSource) eventSource.close();
|
|
312
315
|
return;
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
if (type === 'error') {
|
|
316
319
|
addCard('<h3 class="err">' + T.error + '</h3><p>' + (data.message || '') + '</p>');
|
|
317
|
-
el.
|
|
320
|
+
el.actionsWrap.classList.remove('hidden');
|
|
318
321
|
if (eventSource) eventSource.close();
|
|
319
322
|
}
|
|
320
323
|
};
|
|
@@ -323,14 +326,14 @@
|
|
|
323
326
|
el.btnStart.addEventListener('click', function () {
|
|
324
327
|
el.startWrap.classList.add('hidden');
|
|
325
328
|
el.feed.classList.remove('hidden');
|
|
326
|
-
el.
|
|
329
|
+
el.actionsWrap.classList.add('hidden');
|
|
327
330
|
connect();
|
|
328
331
|
});
|
|
329
332
|
|
|
330
333
|
el.btnRescan.addEventListener('click', function () {
|
|
331
334
|
el.feed.innerHTML = '';
|
|
332
335
|
el.feed.classList.remove('hidden');
|
|
333
|
-
el.
|
|
336
|
+
el.actionsWrap.classList.add('hidden');
|
|
334
337
|
if (eventSource) eventSource.close();
|
|
335
338
|
connect();
|
|
336
339
|
});
|