lowe 0.1.0__py3-none-any.whl
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.
- lowe-0.1.0.dist-info/METADATA +683 -0
- lowe-0.1.0.dist-info/RECORD +204 -0
- lowe-0.1.0.dist-info/WHEEL +5 -0
- lowe-0.1.0.dist-info/entry_points.txt +3 -0
- lowe-0.1.0.dist-info/top_level.txt +3 -0
- lowe_code/__init__.py +1 -0
- lowe_code/approve.py +180 -0
- lowe_code/bestof.py +205 -0
- lowe_code/claudecmds.py +766 -0
- lowe_code/cli.py +1000 -0
- lowe_code/clipboard.py +173 -0
- lowe_code/commands.py +505 -0
- lowe_code/evalcli.py +397 -0
- lowe_code/forecastcli.py +71 -0
- lowe_code/gitinfo.py +37 -0
- lowe_code/goals.py +147 -0
- lowe_code/i18n.py +519 -0
- lowe_code/ide.py +65 -0
- lowe_code/inputbox.py +172 -0
- lowe_code/keymap.py +132 -0
- lowe_code/keys.py +116 -0
- lowe_code/markdown.py +109 -0
- lowe_code/mcpcli.py +106 -0
- lowe_code/morecommands.py +502 -0
- lowe_code/notifycli.py +92 -0
- lowe_code/queuecli.py +141 -0
- lowe_code/releases.py +32 -0
- lowe_code/render.py +653 -0
- lowe_code/reviewcli.py +255 -0
- lowe_code/shortcuts.py +211 -0
- lowe_code/slashmenu.py +133 -0
- lowe_code/team.py +89 -0
- lowe_code/theme.py +47 -0
- lowe_code/toolview.py +206 -0
- lowe_code/tui.py +1098 -0
- lowe_code/voicemode.py +343 -0
- lowe_code/welcome.py +112 -0
- lowe_code/workspace.py +723 -0
- lowe_core/__init__.py +3 -0
- lowe_core/agent/__init__.py +55 -0
- lowe_core/agent/context.py +131 -0
- lowe_core/agent/events.py +156 -0
- lowe_core/agent/hooks.py +45 -0
- lowe_core/agent/loop.py +560 -0
- lowe_core/agent/router.py +65 -0
- lowe_core/agents.py +79 -0
- lowe_core/aside.py +51 -0
- lowe_core/audit.py +33 -0
- lowe_core/chat.py +1356 -0
- lowe_core/checkpoints.py +70 -0
- lowe_core/credentials.py +111 -0
- lowe_core/diffs.py +29 -0
- lowe_core/errors.py +78 -0
- lowe_core/evals/__init__.py +1 -0
- lowe_core/evals/chat_eval.py +329 -0
- lowe_core/evals/improve.py +174 -0
- lowe_core/evals/report.py +174 -0
- lowe_core/evals/runner.py +420 -0
- lowe_core/evals/tasks.py +118 -0
- lowe_core/flair.py +88 -0
- lowe_core/forecast.py +124 -0
- lowe_core/hooks.py +203 -0
- lowe_core/imagegen.py +105 -0
- lowe_core/knowledge/__init__.py +79 -0
- lowe_core/knowledge/china-mirrors.md +25 -0
- lowe_core/knowledge/chinese-text.md +19 -0
- lowe_core/knowledge/cost-and-efficiency.md +17 -0
- lowe_core/knowledge/debugging.md +18 -0
- lowe_core/knowledge/frontend-vue.md +17 -0
- lowe_core/knowledge/git-and-teams.md +16 -0
- lowe_core/knowledge/go-projects.md +14 -0
- lowe_core/knowledge/payments-security.md +21 -0
- lowe_core/knowledge/python-projects.md +17 -0
- lowe_core/knowledge/spring-boot.md +18 -0
- lowe_core/knowledge/testing.md +21 -0
- lowe_core/knowledge/uni-app.md +18 -0
- lowe_core/knowledge/web-forms.md +27 -0
- lowe_core/knowledge/wechat-mini-program.md +21 -0
- lowe_core/knowledge/windows-dev.md +20 -0
- lowe_core/loweapp.py +123 -0
- lowe_core/makefiles.py +483 -0
- lowe_core/mcp.py +669 -0
- lowe_core/memory/__init__.py +26 -0
- lowe_core/memory/dataset.py +103 -0
- lowe_core/memory/learn.py +165 -0
- lowe_core/memory/lessons.py +95 -0
- lowe_core/memory/outcomes.py +179 -0
- lowe_core/memory/project.py +130 -0
- lowe_core/memory/sessions.py +194 -0
- lowe_core/memory/skills.py +282 -0
- lowe_core/memory/textsearch.py +90 -0
- lowe_core/notify.py +229 -0
- lowe_core/offpeak.py +244 -0
- lowe_core/paths.py +30 -0
- lowe_core/permissions/__init__.py +23 -0
- lowe_core/permissions/policy.py +461 -0
- lowe_core/permissions/serious.py +229 -0
- lowe_core/permissions/shellparse.py +930 -0
- lowe_core/plugins.py +174 -0
- lowe_core/profile.py +111 -0
- lowe_core/profiles/__init__.py +145 -0
- lowe_core/profiles/deepseek-flash.yaml +24 -0
- lowe_core/profiles/deepseek-v4-pro.yaml +21 -0
- lowe_core/prompts/__init__.py +88 -0
- lowe_core/prompts/chat.md +48 -0
- lowe_core/prompts/chat_artifacts.md +6 -0
- lowe_core/prompts/chat_files.md +8 -0
- lowe_core/prompts/chat_images.md +7 -0
- lowe_core/prompts/chat_python.md +7 -0
- lowe_core/prompts/chat_search.md +7 -0
- lowe_core/prompts/chat_study.md +10 -0
- lowe_core/prompts/chat_visuals.md +7 -0
- lowe_core/prompts/default.md +59 -0
- lowe_core/providers/__init__.py +47 -0
- lowe_core/providers/base.py +22 -0
- lowe_core/providers/fake.py +78 -0
- lowe_core/providers/openai_compat.py +362 -0
- lowe_core/providers/presets.py +223 -0
- lowe_core/providers/presets.yaml +199 -0
- lowe_core/providers/retry.py +46 -0
- lowe_core/providers/tiers.py +105 -0
- lowe_core/providers/tiers.yaml +44 -0
- lowe_core/providers/watchdog.py +164 -0
- lowe_core/pyrun.py +162 -0
- lowe_core/redact.py +87 -0
- lowe_core/remote/__init__.py +1 -0
- lowe_core/remote/client.py +255 -0
- lowe_core/remote/helper.py +405 -0
- lowe_core/remote/tools.py +350 -0
- lowe_core/research.py +267 -0
- lowe_core/sdk.py +222 -0
- lowe_core/settings.py +317 -0
- lowe_core/styles.py +24 -0
- lowe_core/textio.py +50 -0
- lowe_core/tools/__init__.py +81 -0
- lowe_core/tools/args.py +78 -0
- lowe_core/tools/askuser.py +56 -0
- lowe_core/tools/background.py +86 -0
- lowe_core/tools/base.py +210 -0
- lowe_core/tools/browser.py +325 -0
- lowe_core/tools/codeindex.py +200 -0
- lowe_core/tools/diagnostics.py +264 -0
- lowe_core/tools/files.py +281 -0
- lowe_core/tools/forge.py +236 -0
- lowe_core/tools/forms.py +437 -0
- lowe_core/tools/ignore.py +108 -0
- lowe_core/tools/loweapp.py +47 -0
- lowe_core/tools/notebook.py +129 -0
- lowe_core/tools/repomap.py +262 -0
- lowe_core/tools/search.py +272 -0
- lowe_core/tools/shell.py +347 -0
- lowe_core/tools/subagent.py +125 -0
- lowe_core/tools/todo.py +67 -0
- lowe_core/tools/web.py +251 -0
- lowe_core/tools/workers.py +216 -0
- lowe_core/types.py +97 -0
- lowe_core/verify/__init__.py +16 -0
- lowe_core/verify/changes.py +195 -0
- lowe_core/verify/detect.py +192 -0
- lowe_core/verify/review.py +132 -0
- lowe_core/verify/verifier.py +236 -0
- lowe_core/voice.py +98 -0
- lowe_core/wake.py +523 -0
- lowe_core/websearch.py +196 -0
- lowe_web/__init__.py +1 -0
- lowe_web/app.py +1551 -0
- lowe_web/artifacts.py +212 -0
- lowe_web/desktop.py +166 -0
- lowe_web/extras.py +390 -0
- lowe_web/files.py +181 -0
- lowe_web/handoff.py +66 -0
- lowe_web/jobs.py +92 -0
- lowe_web/login.py +170 -0
- lowe_web/phone.py +72 -0
- lowe_web/server.py +243 -0
- lowe_web/settings.py +188 -0
- lowe_web/shares.py +319 -0
- lowe_web/static/app.css +690 -0
- lowe_web/static/app.js +2309 -0
- lowe_web/static/favicon.ico +0 -0
- lowe_web/static/icons/apple-touch-icon.png +0 -0
- lowe_web/static/icons/lowe-icon-144.png +0 -0
- lowe_web/static/icons/lowe-icon-192.png +0 -0
- lowe_web/static/icons/lowe-icon-512.png +0 -0
- lowe_web/static/index.html +239 -0
- lowe_web/static/lowe-icon-small.svg +1 -0
- lowe_web/static/lowe-icon.svg +1 -0
- lowe_web/static/manifest.webmanifest +17 -0
- lowe_web/static/settings.js +686 -0
- lowe_web/static/share.css +23 -0
- lowe_web/static/share.html +26 -0
- lowe_web/static/share.js +100 -0
- lowe_web/static/sw.js +36 -0
- lowe_web/static/theme.js +6 -0
- lowe_web/static/vendor/highlight.LICENSE.txt +29 -0
- lowe_web/static/vendor/highlight.min.js +1262 -0
- lowe_web/static/vendor/marked.LICENSE.md +44 -0
- lowe_web/static/vendor/marked.js +82 -0
- lowe_web/static/vendor/purify.LICENSE.txt +202 -0
- lowe_web/static/vendor/purify.min.js +7 -0
- lowe_web/static/voice.js +178 -0
- lowe_web/static/wake.js +292 -0
- lowe_web/store.py +1030 -0
- lowe_web/tunnel.py +51 -0
|
@@ -0,0 +1,683 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lowe
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LOWE: an AI assistant and terminal coding agent built for developers in China
|
|
5
|
+
Author-email: Lowe Tekam <lowetekam@gmail.com>
|
|
6
|
+
License: Proprietary
|
|
7
|
+
Requires-Python: >=3.11
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Requires-Dist: httpx>=0.27
|
|
10
|
+
Requires-Dist: rich>=13.7
|
|
11
|
+
Requires-Dist: prompt_toolkit>=3.0.43
|
|
12
|
+
Requires-Dist: pyyaml>=6.0
|
|
13
|
+
Requires-Dist: jsonschema>=4.21
|
|
14
|
+
Requires-Dist: pathspec>=0.12
|
|
15
|
+
Requires-Dist: tree-sitter>=0.23
|
|
16
|
+
Requires-Dist: tree-sitter-python>=0.23
|
|
17
|
+
Requires-Dist: tree-sitter-javascript>=0.23
|
|
18
|
+
Requires-Dist: tree-sitter-typescript>=0.23
|
|
19
|
+
Requires-Dist: tree-sitter-java>=0.23
|
|
20
|
+
Requires-Dist: tree-sitter-go>=0.23
|
|
21
|
+
Requires-Dist: starlette>=0.40
|
|
22
|
+
Requires-Dist: uvicorn>=0.30
|
|
23
|
+
Requires-Dist: pypdf>=5.0
|
|
24
|
+
Requires-Dist: openpyxl>=3.1
|
|
25
|
+
Requires-Dist: python-docx>=1.1
|
|
26
|
+
Requires-Dist: python-pptx>=1.0
|
|
27
|
+
Requires-Dist: reportlab>=4.0
|
|
28
|
+
Requires-Dist: segno>=1.6
|
|
29
|
+
Provides-Extra: voice
|
|
30
|
+
Requires-Dist: faster-whisper>=1.1; extra == "voice"
|
|
31
|
+
Requires-Dist: av<16,>=14; extra == "voice"
|
|
32
|
+
Provides-Extra: wake
|
|
33
|
+
Requires-Dist: sounddevice>=0.4; extra == "wake"
|
|
34
|
+
Provides-Extra: phone
|
|
35
|
+
Requires-Dist: cryptography>=42; extra == "phone"
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: pytest>=8; extra == "dev"
|
|
38
|
+
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
|
|
39
|
+
Requires-Dist: respx>=0.21; extra == "dev"
|
|
40
|
+
Requires-Dist: ruff>=0.6; extra == "dev"
|
|
41
|
+
Requires-Dist: mypy>=1.10; extra == "dev"
|
|
42
|
+
Requires-Dist: types-PyYAML; extra == "dev"
|
|
43
|
+
Requires-Dist: types-jsonschema; extra == "dev"
|
|
44
|
+
Requires-Dist: playwright>=1.40; extra == "dev"
|
|
45
|
+
Requires-Dist: pywinpty>=2.0; sys_platform == "win32" and extra == "dev"
|
|
46
|
+
Requires-Dist: pyte>=0.8; extra == "dev"
|
|
47
|
+
|
|
48
|
+
# LOWE
|
|
49
|
+
|
|
50
|
+
[中文版 README](README.zh-CN.md)
|
|
51
|
+
|
|
52
|
+
LOWE is an AI assistant and terminal coding agent built for developers in China.
|
|
53
|
+
It runs on Chinese model providers (DeepSeek first, then GLM, Kimi and Qwen) and keeps
|
|
54
|
+
all data on your machine.
|
|
55
|
+
|
|
56
|
+
- **LOWE Code** (`lowe`): a coding agent in your terminal. It has file and shell tools,
|
|
57
|
+
checks its own work (tests, build, review), and has permission modes, a Docker
|
|
58
|
+
sandbox, memory, sessions and budgets. It also has helper agents, git, GitHub/Gitee,
|
|
59
|
+
hooks, MCP tools and remote projects over SSH (`--remote`), and it learns from its
|
|
60
|
+
own work.
|
|
61
|
+
- **LOWE chat** (`lowe web`): a chat app in the browser. It has files, a side panel for
|
|
62
|
+
code and web pages, projects, and personal links for a team. It also comes as a
|
|
63
|
+
Docker image for a server.
|
|
64
|
+
- **The VS Code extension**: LOWE Code in a panel, with each change shown as a diff
|
|
65
|
+
beside the code.
|
|
66
|
+
|
|
67
|
+
How it compares with Claude Code, with numbers: [COMPARISON.md](COMPARISON.md). What
|
|
68
|
+
comes next: [ROADMAP.md](ROADMAP.md).
|
|
69
|
+
|
|
70
|
+
## Install
|
|
71
|
+
|
|
72
|
+
See **[INSTALL.md](INSTALL.md)** (Windows, WSL, Linux and macOS, with Chinese mirrors).
|
|
73
|
+
In short:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python -m pip install --user pipx && python -m pipx ensurepath # then open a new terminal
|
|
77
|
+
pipx install lowe-0.1.0-py3-none-any.whl # or: pipx install <LOWE's source folder>
|
|
78
|
+
setx DEEPSEEK_API_KEY "sk-..." # Windows; Linux/macOS: export it in ~/.bashrc
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Keys for other providers are optional. With them LOWE can continue a task elsewhere when
|
|
82
|
+
DeepSeek fails (see [LOWE models](#lowe-models)): `ZHIPUAI_API_KEY` (GLM),
|
|
83
|
+
`MOONSHOT_API_KEY` (Kimi), `DASHSCOPE_API_KEY` (Qwen).
|
|
84
|
+
|
|
85
|
+
## Use
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
lowe # interactive; Ctrl+C stops a task, Ctrl+D quits
|
|
89
|
+
lowe -p "fix the failing test" # one task, then exit
|
|
90
|
+
lowe --model steady # another LOWE model (see below)
|
|
91
|
+
lowe --bugfix -p "users say X is wrong" # reproduce with a failing test first, then fix
|
|
92
|
+
lowe --sandbox # run every shell command in a Docker container
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
After LOWE changes files it runs diagnostics, the project's tests and build, sends any
|
|
96
|
+
failures back to the model, has a reviewer read the diff, and then reports what passed,
|
|
97
|
+
what failed and what it could not verify. The commands it runs are kept in `LOWE.md`
|
|
98
|
+
in your project; edit that file to change them. Turn parts off with `--no-verify`,
|
|
99
|
+
`--no-review`, `--no-build`.
|
|
100
|
+
|
|
101
|
+
## Hands-free: say "LOWE" (`lowe voice`)
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install "lowe[voice,wake]" # Whisper on this computer, and the microphone
|
|
105
|
+
lowe voice # listen for the wake word, hands free
|
|
106
|
+
lowe voice --lang en --model base # faster: your language, a smaller model
|
|
107
|
+
lowe voice --wav me.wav --dry-run # read a recording: what did it hear?
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Say the name and the request in one breath:
|
|
111
|
+
|
|
112
|
+
- **"LOWE code, fix the failing test"** wakes LOWE and runs the task in this folder (LOWE
|
|
113
|
+
Code, with the project's own settings, permissions and budget).
|
|
114
|
+
- **"LOWE web, show today's chats"** opens LOWE web: the window that is already serving, or
|
|
115
|
+
a new one.
|
|
116
|
+
- **"LOWE"** alone: a chime, then the next phrase is the request.
|
|
117
|
+
- 洛威 works too, and a Chinese request may follow the English name.
|
|
118
|
+
|
|
119
|
+
In the browser, the ear button next to the microphone does the same (`/api/wake`). The page
|
|
120
|
+
watches the microphone's loudness itself and only sends a phrase when somebody spoke, so an
|
|
121
|
+
always-on listener costs no model calls, and nothing leaves this computer: the same local
|
|
122
|
+
Whisper the microphone uses reads the words.
|
|
123
|
+
|
|
124
|
+
Two things are on purpose. It is more forgiving than Siri about the name ("Loewe", "lowe's",
|
|
125
|
+
"loww", "洛威" all wake it, accents included) and stricter than Siri about everything else
|
|
126
|
+
("below", "lower", "yellow", "law of gravity" never do). And the request is read from the
|
|
127
|
+
same breath as the name, so there is no waiting turn after the chime. The rules are in
|
|
128
|
+
`lowe_core/wake.py`, the tests in `tests/test_wake.py`; `--min-confidence 0.9` takes only
|
|
129
|
+
the real spellings of the name, for a loud room.
|
|
130
|
+
|
|
131
|
+
## Use LOWE from Python (the SDK)
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
pip install "lowe[voice]" # only needed for the microphone; the SDK needs nothing extra
|
|
135
|
+
python -c "from lowe_core.sdk import Lowe; print(Lowe)"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
import asyncio
|
|
140
|
+
from lowe_core.agent import AgentText
|
|
141
|
+
from lowe_core.sdk import Lowe
|
|
142
|
+
|
|
143
|
+
async def main() -> None:
|
|
144
|
+
lowe = Lowe(root=".", mode="accept-edits")
|
|
145
|
+
async for event in lowe.stream("fix the failing test in tests/test_parse.py"):
|
|
146
|
+
if isinstance(event, AgentText):
|
|
147
|
+
print(event.text, end="")
|
|
148
|
+
result = await lowe.ask("add a test for the empty case")
|
|
149
|
+
print(result.text, result.reason, result.cny, result.changes)
|
|
150
|
+
|
|
151
|
+
asyncio.run(main())
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
It is the same loop, tools, permission policy and budget the terminal runs, with a result a
|
|
155
|
+
program can read (`text`, `reason`, `steps`, `cny`, `changes`). A library has nobody to answer
|
|
156
|
+
a permission question, so anything the policy cannot decide is refused unless you pass
|
|
157
|
+
`approver=`. Sessions, verification and the reviewer pass stay in the CLI: for CI, use
|
|
158
|
+
`lowe -p "..." --output-format json`. Full reference: [docs/SDK.md](docs/SDK.md).
|
|
159
|
+
|
|
160
|
+
## A message when a long task is done (WeCom, DingTalk, Feishu)
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
lowe notify show # what is configured, and after how long
|
|
164
|
+
lowe notify test # send a test message now
|
|
165
|
+
lowe notify test --url https://open.feishu.cn/open-apis/bot/v2/hook/... # try one
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
One URL in `~/.lowe/settings.json`, and a task that runs past two minutes tells your phone:
|
|
169
|
+
|
|
170
|
+
```json
|
|
171
|
+
{"notify": {"url": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=...",
|
|
172
|
+
"minSeconds": 120}}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
The service is read from the URL — `qyapi.weixin.qq.com` is WeCom (企业微信),
|
|
176
|
+
`oapi.dingtalk.com` is DingTalk (钉钉; add `"secret": "SEC..."` if that robot uses 加签),
|
|
177
|
+
`open.feishu.cn` / `open.larksuite.com` is Feishu (飞书) — or name it with `"kind"`. Any other
|
|
178
|
+
URL is sent `{"text": ...}`.
|
|
179
|
+
|
|
180
|
+
The message is metadata only: the task as you typed it (300 characters), how it ended, the
|
|
181
|
+
time, the cost and the folder — no file contents and no model output. Only **your own**
|
|
182
|
+
settings can set it: a repository's shared `.lowe/settings.json` is ignored (kept aside as
|
|
183
|
+
untrusted), because a webhook carries a task's text off this machine. `"notify": false` or
|
|
184
|
+
`LOWE_NOTIFY=0` turns it off in one place.
|
|
185
|
+
|
|
186
|
+
## What will this cost? (`lowe forecast`)
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
lowe forecast "fix the failing tests" # ≈ ¥0.04, about 3 min — from 14 similar tasks (tests)
|
|
190
|
+
lowe forecast --json "add a dark mode" # the same numbers for a script
|
|
191
|
+
lowe -p "fix the failing tests" # prints the same line, then runs
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
The numbers come from your own `~/.lowe/outcomes.jsonl`, which every finished task already
|
|
195
|
+
writes: the **median** money and time of the recent tasks of the same kind (bugfix, tests,
|
|
196
|
+
feature, refactor, build, question, other), preferring the model you are about to run. The
|
|
197
|
+
median, not the average, so one runaway refactor does not inflate every later forecast.
|
|
198
|
+
|
|
199
|
+
It stays **silent until five such tasks exist** — a forecast made of two data points is a guess
|
|
200
|
+
wearing a number. Durations were only recorded from this version on, so older history still
|
|
201
|
+
forecasts the money and simply leaves the time out.
|
|
202
|
+
|
|
203
|
+
## Batch work at the cheaper hours (`--at-off-peak`)
|
|
204
|
+
|
|
205
|
+
DeepSeek charges **twice as much** on weekday mornings and afternoons (Beijing 09:00–12:00
|
|
206
|
+
and 14:00–18:00) as it does at night and at weekends. A long job that nobody is waiting for
|
|
207
|
+
can run in the cheap window instead:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
lowe --at-off-peak -p "run the whole test suite and fix what fails" # queued if it is peak
|
|
211
|
+
lowe queue # what is waiting, and when it opens
|
|
212
|
+
lowe queue --run # run the jobs whose window is open now
|
|
213
|
+
lowe queue --wait # sit here until the window opens, then run
|
|
214
|
+
lowe queue --run-all # the escape hatch: run everything now
|
|
215
|
+
lowe queue --clear
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Queuing only happens during a peak hour; off-peak the task runs immediately as usual. The
|
|
219
|
+
queue is `~/.lowe/queue.json`, and a queued job runs as an ordinary `lowe -p` task in its own
|
|
220
|
+
folder, so the usual permissions, budget and verification apply. A job that fails stays
|
|
221
|
+
queued with one more try recorded; nothing runs unless you ask (`--run`, `--wait`). Providers
|
|
222
|
+
without a peak schedule (Kimi, Qwen, a local model) never wait.
|
|
223
|
+
|
|
224
|
+
## LOWE chat in the browser (`lowe web`)
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
lowe web # starts the chat app and opens it in your browser
|
|
228
|
+
lowe web --no-browser --port 9000
|
|
229
|
+
lowe web --new-link # a new secret link; old links stop working
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`lowe web` prints a link with a secret in it; opening it lets that browser in (keep the
|
|
233
|
+
link private). Chats, projects and files are stored in `~/.lowe/web/lowe.db` on your
|
|
234
|
+
machine.
|
|
235
|
+
|
|
236
|
+
- Streamed answers with Markdown and coloured code, copy buttons, Stop, Regenerate and
|
|
237
|
+
Edit; light and dark mode; Chinese and English (the 中文 / English button).
|
|
238
|
+
- The LOWE model menu (the same models, prices and fallback as LOWE Code) and a **Think**
|
|
239
|
+
switch for hard questions (slower and dearer).
|
|
240
|
+
- **Files**: attach code, text (UTF-8 or GBK) and PDF files (with a text layer; scanned
|
|
241
|
+
PDFs have no text to read). Up to 20 MB each.
|
|
242
|
+
- **Side panel**: long code and whole web pages open next to the chat; web pages run as a
|
|
243
|
+
live **Preview** in a locked-down frame.
|
|
244
|
+
- **Projects**: instructions and files shared by every chat in the project.
|
|
245
|
+
- **No surprise costs.**
|
|
246
|
+
- The meter next to Send shows what the message you are typing will probably cost
|
|
247
|
+
and what you spent today (`≈ ¥0.004 · today ¥0.12 of ¥5.00`).
|
|
248
|
+
- Click it to set a **daily cap**: once it is reached, LOWE starts no new answer.
|
|
249
|
+
It never cuts one off half way.
|
|
250
|
+
- Click it also to set the amount above which LOWE **asks before sending** (¥0.05 by
|
|
251
|
+
default): useful for a big PDF.
|
|
252
|
+
- An answer that stopped half way is charged what the provider really billed for it,
|
|
253
|
+
estimated (`≈ ¥`). A request that failed before answering costs nothing.
|
|
254
|
+
- Each person with a link has their own cap and meter.
|
|
255
|
+
- **Open in LOWE Code**: saves the chat as a LOWE Code session in a project folder you
|
|
256
|
+
choose and opens a terminal (`lowe --cwd <folder> --resume <id>`), so the agent can carry
|
|
257
|
+
on with tools.
|
|
258
|
+
- Your notes (`~/.lowe/LOWE.md`), your own lessons and LOWE's know-how apply here too.
|
|
259
|
+
|
|
260
|
+
### Several people (personal links)
|
|
261
|
+
|
|
262
|
+
Whoever runs `lowe web` is its owner. Give other people their own link:
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
lowe web add-user alice # prints Alice's personal link (shown once)
|
|
266
|
+
lowe web users # everyone with a link, their chats and what they cost
|
|
267
|
+
lowe web reset-link alice # a new link for Alice; the old one stops working
|
|
268
|
+
lowe web remove-user alice # Alice's link stops working (add --delete-chats to delete them)
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Each person sees only their own projects, chats and files, and only a hash of each link
|
|
272
|
+
is stored. Your own notes and lessons stay out of other people's chats, and only the
|
|
273
|
+
owner can hand a chat to LOWE Code, because handing over writes to the server's disk.
|
|
274
|
+
Everyone uses the server's API keys.
|
|
275
|
+
|
|
276
|
+
### On a server
|
|
277
|
+
|
|
278
|
+
`lowe web --host 0.0.0.0` lets other computers in with a link. For a team, use the
|
|
279
|
+
Docker image (`docker build -t lowe-web .`, see [INSTALL.md](INSTALL.md#lowe-chat-on-a-server-docker)).
|
|
280
|
+
It runs as an ordinary user and keeps everything in the `/data` volume. Put HTTPS in
|
|
281
|
+
front of it (a reverse proxy) and set `--public-url https://lowe.example.com` or
|
|
282
|
+
`LOWE_PUBLIC_URL`, so the printed links use that address and the login cookie is sent
|
|
283
|
+
over HTTPS only.
|
|
284
|
+
|
|
285
|
+
## LOWE models
|
|
286
|
+
|
|
287
|
+
`/model` lists LOWE's models with what they run on, measured with LOWE's own eval suite
|
|
288
|
+
([evals/RANKING.md](evals/RANKING.md)):
|
|
289
|
+
|
|
290
|
+
| LOWE model | Runs on | Tasks passed | ¥ per task |
|
|
291
|
+
|---|---|---|---|
|
|
292
|
+
| **Swift** (default) | DeepSeek Flash | 98% | ¥0.024 |
|
|
293
|
+
| Steady | GLM-5.3 Flash | 94% | ¥0.033 |
|
|
294
|
+
| Focus | Kimi K2.7 Code | 100%* | ¥0.19 |
|
|
295
|
+
| Wide | Qwen3 Coder Flash | 89%* | ¥0.60 |
|
|
296
|
+
| Deep (only when chosen) | DeepSeek V4 Pro | 93% | ¥0.091 |
|
|
297
|
+
|
|
298
|
+
\* measured on 9-11 tasks only. Switch with `/model steady` or `lowe --model steady`; a
|
|
299
|
+
provider's own model names (`/model glm-4.7-flash`) work too.
|
|
300
|
+
|
|
301
|
+
- **Fallback.** When a provider fails in a way another can get past (no balance, a bad
|
|
302
|
+
key, an outage, a rate limit LOWE could not wait out), LOWE says so and continues the
|
|
303
|
+
same task on the next model in the table that has a key: Swift → Steady → Focus → Wide.
|
|
304
|
+
Change the order with `"fallback": ["steady", "wide"]` in settings; turn it off with
|
|
305
|
+
`"fallback": false` or `--no-fallback`.
|
|
306
|
+
- **Deep is never used on its own.** It passed fewer tasks than Swift at 3.7x the price,
|
|
307
|
+
so neither fallback nor `--router`/`--team` choose it; only `/model deep`,
|
|
308
|
+
`--model deep` or `--strong-model deep` do.
|
|
309
|
+
- **Budget.** A task stops once it has cost ¥1 unless you set another limit (below).
|
|
310
|
+
|
|
311
|
+
## Memory, sessions and cost
|
|
312
|
+
|
|
313
|
+
- `LOWE.md` in your project holds notes LOWE reads at the start of every session
|
|
314
|
+
(structure, commands, conventions). Type `/init` and LOWE writes it for you.
|
|
315
|
+
`~/.lowe/LOWE.md` holds your own preferences for all projects.
|
|
316
|
+
- Every conversation is saved in `~/.lowe/sessions/` (secrets removed). Continue one with
|
|
317
|
+
`lowe --resume` (choose from a list), `lowe --resume <id>`, or `/resume` inside LOWE.
|
|
318
|
+
- Long conversations are summarised automatically when they pass the model's context
|
|
319
|
+
budget. The start of the prompt never changes, so DeepSeek's prompt cache keeps working
|
|
320
|
+
(cached input costs about 1/50 of uncached input).
|
|
321
|
+
- `/cost` shows tokens and cost in ¥ and $ for the session and the last task, and the
|
|
322
|
+
cache hit rate. Each task stops at ¥1 by default; change it with `--budget-cny 0.5` or
|
|
323
|
+
`--budget-tokens 200000`, or in settings: `"budget": {"cny": 0.5}`. `0` means no limit.
|
|
324
|
+
|
|
325
|
+
| Command | |
|
|
326
|
+
|---|---|
|
|
327
|
+
| `/help` | all commands |
|
|
328
|
+
| `/cost` | tokens, ¥ and $, cache hit rate |
|
|
329
|
+
| `/model [name]` | LOWE models with measured pass rates; switch with `/model steady` |
|
|
330
|
+
| `/provider [id]` | show or switch the provider |
|
|
331
|
+
| `/permissions` | show the mode and rules; `/permissions mode auto`, `/permissions allow bash:npm run *` |
|
|
332
|
+
| `/plan` / `/plan off` | plan mode on or off |
|
|
333
|
+
| `/review` | review your uncommitted git changes for bugs |
|
|
334
|
+
| `/learn` | lessons LOWE remembers: `/learn add <text>`, `/learn edit <n> <text>`, `/learn rm <n>` |
|
|
335
|
+
| `/skills` | recipes LOWE wrote after verified multi-step tasks: `/skills show <n>`, `/skills rm <n>` |
|
|
336
|
+
| `/mcp` | MCP servers and their tools |
|
|
337
|
+
| `/stats` | your results per kind of task and LOWE model; `/stats clear` deletes them |
|
|
338
|
+
| `/init` | write LOWE.md for this project |
|
|
339
|
+
| `/resume` | continue an earlier conversation |
|
|
340
|
+
| `/show [n]` | show a long tool output in full |
|
|
341
|
+
| `/lang zh` / `/lang en` | interface language (default: your system language; or `--lang`) |
|
|
342
|
+
| `/clear` | start a new conversation |
|
|
343
|
+
| `/exit` | quit (or Ctrl+D) |
|
|
344
|
+
|
|
345
|
+
After each task a status line shows the model, the session's cost, how full the context
|
|
346
|
+
is, the permission mode and the git branch with its number of changed files.
|
|
347
|
+
|
|
348
|
+
## LOWE learns
|
|
349
|
+
|
|
350
|
+
After a task that ran into a problem and still finished (a failed command or tool call,
|
|
351
|
+
tests that failed before they passed), LOWE asks its cheapest model whether there is
|
|
352
|
+
anything worth remembering for later tasks in this project, and shows what it keeps:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
✎ Learned for next time: This project has no `npm test` script; run `npm run check`.
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
Lessons live in `<project>/.lowe/lessons.md` (yours for all projects:
|
|
359
|
+
`~/.lowe/lessons.md`), plain Markdown you can read and edit. `/learn` lists them,
|
|
360
|
+
`/learn edit <n> <text>` changes one, `/learn rm <n>` deletes it. They apply from the next
|
|
361
|
+
conversation. A lesson never contains links, download-and-run commands, secrets or
|
|
362
|
+
anything about permissions, and lessons cannot change what LOWE is allowed to do. Tasks
|
|
363
|
+
without problems cost nothing extra; a lesson costs about ¥0.001.
|
|
364
|
+
|
|
365
|
+
**Skills.** After a multi-step task whose changes passed verification, LOWE asks whether
|
|
366
|
+
it was a procedure likely to come up again (a new endpoint, a migration, a new page) and
|
|
367
|
+
if so writes a recipe to `<project>/.lowe/skills/<name>.md`. When a later task matches a
|
|
368
|
+
skill, LOWE says so and hands the recipe to the model with the task. A skill counts its
|
|
369
|
+
successes and failures, and one that fails more often than it works is deleted. `/skills`
|
|
370
|
+
lists them, `/skills show <n>` and `/skills rm <n>` show or delete one. Matching is local
|
|
371
|
+
(word overlap, Chinese included): nothing is downloaded or sent anywhere.
|
|
372
|
+
|
|
373
|
+
Turn lessons and skills off with `--no-learn` or `"autoLearn": false`.
|
|
374
|
+
|
|
375
|
+
**Built-in know-how.** LOWE ships with short expert recipes for common work in China:
|
|
376
|
+
- package mirrors (pip, npm, Maven, Gradle, Go, conda, Cargo, Hugging Face, Docker);
|
|
377
|
+
- WeChat mini programs, uni-app, Spring Boot, Vue 3, Python and Go projects;
|
|
378
|
+
- Chinese text and encodings, payments and secrets (WeChat Pay, Alipay);
|
|
379
|
+
- Windows pitfalls, a bug-fixing method, writing tests, git in teams, and working cheaply.
|
|
380
|
+
|
|
381
|
+
A task that mentions a topic's keywords gets that recipe with it (`📚 LOWE know-how: ...`);
|
|
382
|
+
most tasks get none and cost nothing extra. They are in `lowe_core/knowledge/`, and
|
|
383
|
+
`"knowHow": false` turns them off.
|
|
384
|
+
|
|
385
|
+
**Which model works best for you.** LOWE records every task's outcome in
|
|
386
|
+
`~/.lowe/outcomes.jsonl`: the kind of task (bug fix, feature, refactor, tests, build,
|
|
387
|
+
question; English and Chinese), the LOWE model, whether it was solved (finished, and
|
|
388
|
+
verified if files changed) and its cost. Never the task's text or code. `/stats` shows
|
|
389
|
+
it; `/stats clear` deletes it. With `--auto-model` (or `"autoModel": true`), LOWE picks
|
|
390
|
+
the model with the best value (tasks solved per yuan) for each kind of task, learning from
|
|
391
|
+
your own results. It starts from the eval suite's numbers and keeps trying the others now
|
|
392
|
+
and then (Thompson sampling). It chooses between Swift and Steady unless you list others,
|
|
393
|
+
e.g. `"autoModel": ["swift", "steady", "focus"]`.
|
|
394
|
+
|
|
395
|
+
`/stats` also shows the last four weeks: cost, tokens and prompt-cache hits per task, and
|
|
396
|
+
the change in ¥ per task from the week before.
|
|
397
|
+
|
|
398
|
+
**Training data (opt-in).** With `"collectTraining": true`, each solved task is saved,
|
|
399
|
+
anonymised (secrets removed; project folder, home folder and your git name and e-mail
|
|
400
|
+
replaced), to `~/.lowe/dataset/`. Only tasks on providers whose terms allow training on
|
|
401
|
+
their output are kept (DeepSeek, local models). `scripts/finetune_lora.py` fine-tunes an
|
|
402
|
+
open coding model on it later: see [docs/TRAINING.md](docs/TRAINING.md).
|
|
403
|
+
|
|
404
|
+
**Code index.** The `search_code` tool finds code by what it does ("where refunds are
|
|
405
|
+
calculated", "用户登录校验") from a local word index of the project: one entry per
|
|
406
|
+
function, class or 50-line region. The index is kept in `~/.lowe/index/` and only changed
|
|
407
|
+
files are read again (LOWE's own repository: about 500 files, 0.9 s the first time,
|
|
408
|
+
0.2 s after, 200 KB). It runs on your machine and needs no download.
|
|
409
|
+
|
|
410
|
+
## Helpers, plans, git, GitHub and Gitee
|
|
411
|
+
|
|
412
|
+
- For bigger tasks LOWE keeps a checklist (☐ ▶ ☑) and updates it as it works.
|
|
413
|
+
- LOWE can hand a wide search to a **helper** on the cheapest model of the provider. The
|
|
414
|
+
helper can only read; its exploration stays out of the main conversation, and its cost is
|
|
415
|
+
added to yours. Turn helpers off with `--no-helpers`.
|
|
416
|
+
- LOWE commits only when you ask, after looking at `git status` and `git diff`.
|
|
417
|
+
- `forge` reads issues and opens pull requests on the project's GitHub or Gitee repository
|
|
418
|
+
(from `git remote origin`). Tokens: `GITHUB_TOKEN`/`GH_TOKEN`, `gh auth token` or git's
|
|
419
|
+
saved credentials for GitHub; `GITEE_TOKEN` for Gitee. Opening a pull request is always
|
|
420
|
+
confirmed first, in every mode.
|
|
421
|
+
|
|
422
|
+
## Router, team and best-of-N
|
|
423
|
+
|
|
424
|
+
Ways to spend more on a strong model where it matters. The strong model is the one you
|
|
425
|
+
name with `--strong-model` (a LOWE model of the same provider, e.g. `deep`, or a model
|
|
426
|
+
name; or `"strongModel"` in settings). Without one it is your own model, so nothing costs
|
|
427
|
+
more. None of these beat Swift alone in the evals: see
|
|
428
|
+
[evals/EXPERIMENTS.md](evals/EXPERIMENTS.md).
|
|
429
|
+
|
|
430
|
+
- `--router`: your model does the routine steps. The strong model takes the first step
|
|
431
|
+
(reading the task and choosing the approach), the next three steps after LOWE's
|
|
432
|
+
verification or review rejected the work, and the steps after two tool errors in a row.
|
|
433
|
+
It also reviews.
|
|
434
|
+
- `--team`: the strong model first explores the project read-only and writes a
|
|
435
|
+
step-by-step plan; your model carries it out; the strong model reviews the diff.
|
|
436
|
+
- `--best-of N` (with `-p`, in a git repository): the task is solved N times in parallel
|
|
437
|
+
git worktrees, each candidate's tests are run, and the best one is applied to your
|
|
438
|
+
project (tests pass > finished normally > changed something > smaller change > cheaper).
|
|
439
|
+
Your branch, index and files are not touched until the winner is applied. It costs about
|
|
440
|
+
N times as much.
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
lowe --router --strong-model deep
|
|
444
|
+
lowe --team --strong-model deep -p "add pagination to the /users endpoint"
|
|
445
|
+
lowe --best-of 3 -p "fix the failing date parsing test"
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
## Remote projects (`--remote`)
|
|
449
|
+
|
|
450
|
+
```bash
|
|
451
|
+
lowe --remote me@server:/srv/app # a project on another machine, over SSH
|
|
452
|
+
lowe --remote myserver:app # a host from ~/.ssh/config; the path from the home folder
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
LOWE runs here, and its file tools, searches and shell commands run there. It uses one SSH
|
|
456
|
+
connection and a small helper that needs only `python3` on that machine; nothing is
|
|
457
|
+
installed there.
|
|
458
|
+
|
|
459
|
+
The rules are the same as for a local project: read before edit, GBK and CRLF files stay
|
|
460
|
+
as they are, and `.gitignore` is respected. The same permission checks apply, made here
|
|
461
|
+
before anything is sent. Ctrl+C stops the remote command too.
|
|
462
|
+
|
|
463
|
+
LOWE keeps a local copy of the project's `LOWE.md`, settings and build files (in
|
|
464
|
+
`~/.lowe/remote/`), so it knows the project's test commands, and its checks run on the
|
|
465
|
+
remote machine. Continue a session with `lowe --remote me@server:/srv/app --resume <id>`.
|
|
466
|
+
|
|
467
|
+
Limits for now:
|
|
468
|
+
- The file tools only work inside the remote project folder.
|
|
469
|
+
- Changes made by shell commands (rather than LOWE's edit tools) are not shown in the
|
|
470
|
+
review diff.
|
|
471
|
+
- Helpers, `--team`, `--sandbox` and `--best-of` are not available with `--remote`.
|
|
472
|
+
- Hooks and MCP servers run on your own machine.
|
|
473
|
+
|
|
474
|
+
Connection options go in `~/.ssh/config`, or in the `LOWE_SSH` environment variable
|
|
475
|
+
(`LOWE_SSH="ssh -p 2222 -i ~/.ssh/work"`).
|
|
476
|
+
|
|
477
|
+
## MCP tools
|
|
478
|
+
|
|
479
|
+
LOWE can use tools from [Model Context Protocol](https://modelcontextprotocol.io) servers.
|
|
480
|
+
Add servers to settings in the same format as other MCP clients:
|
|
481
|
+
|
|
482
|
+
```json
|
|
483
|
+
"mcpServers": {
|
|
484
|
+
"github": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"],
|
|
485
|
+
"env": {"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_TOKEN}",
|
|
486
|
+
"npm_config_registry": "https://registry.npmmirror.com"}},
|
|
487
|
+
"docs": {"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "D:/docs"]}
|
|
488
|
+
}
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
- LOWE starts them with the session (`MCP: github (26 tools)`), and the model sees their
|
|
492
|
+
tools as `mcp__github__create_issue` and so on. `/mcp` lists them.
|
|
493
|
+
- `${NAME}` takes a value from an environment variable, so tokens stay out of the file.
|
|
494
|
+
- **Local and network servers.** `command`/`args` start a local (stdio) server; `url` talks to
|
|
495
|
+
an HTTP one, with `headers` for its token — `lowe mcp add docs --url https://… --header
|
|
496
|
+
"Authorization=Bearer ${DOCS_TOKEN}"`.
|
|
497
|
+
- **Resources and prompts**, not only tools: a server that offers them gets one extra tool
|
|
498
|
+
each — `mcp__<server>__read_resource` (by URI) and `mcp__<server>__get_prompt` (by name,
|
|
499
|
+
with arguments) — with the available URIs and names in the tool's description, so a server
|
|
500
|
+
with 300 resources does not fill the tool list. Servers with tools only look exactly as
|
|
501
|
+
before.
|
|
502
|
+
- **Permissions.** Every MCP call asks first. LOWE cannot know what an outside tool
|
|
503
|
+
changes. Exceptions:
|
|
504
|
+
- an allow rule (`"allow": ["tool:mcp__docs__*"]`) or `auto` mode lets them run;
|
|
505
|
+
- `plan` mode refuses them.
|
|
506
|
+
- A repository's shared `.lowe/settings.json` can list servers, but they only start after
|
|
507
|
+
you trust them once, as with hooks. If the command changes, LOWE asks again.
|
|
508
|
+
|
|
509
|
+
## VS Code
|
|
510
|
+
|
|
511
|
+
Install `vscode/lowe-code-0.1.0.vsix` (see [INSTALL.md](INSTALL.md#the-vs-code-extension)),
|
|
512
|
+
then open a project and press `Ctrl+Alt+L` (or use the LOWE button in the title bar or
|
|
513
|
+
status bar). LOWE Code runs in the bottom panel, or in an editor tab beside the code with
|
|
514
|
+
`"lowe.openIn": "editor"`.
|
|
515
|
+
|
|
516
|
+
- Each time LOWE changes a file, a read-only diff opens beside your code: the file
|
|
517
|
+
before LOWE's first change in this session, and the file now. Your cursor stays in
|
|
518
|
+
LOWE's terminal.
|
|
519
|
+
- **LOWE: Review LOWE's changes** lists the session's changed files.
|
|
520
|
+
- Right-click selected code → **Ask LOWE about the selection**.
|
|
521
|
+
- Settings: `lowe.command`, `lowe.args` (e.g. `["--mode", "accept-edits"]`),
|
|
522
|
+
`lowe.showDiffs`, `lowe.openIn`.
|
|
523
|
+
|
|
524
|
+
## Hooks
|
|
525
|
+
|
|
526
|
+
Your own commands before or after tool calls, in settings:
|
|
527
|
+
|
|
528
|
+
```json
|
|
529
|
+
"hooks": [
|
|
530
|
+
{"event": "after_tool", "tools": "edit_file|write_file", "command": "npx prettier --write \"$LOWE_FILE\""},
|
|
531
|
+
{"event": "before_tool", "tools": "bash", "command": "python check_command.py"}
|
|
532
|
+
]
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
A `before_tool` hook that fails blocks the call. An `after_tool` hook's output is shown to
|
|
536
|
+
the model. Hooks get `LOWE_TOOL`, `LOWE_TOOL_ARGS`, `LOWE_FILE` and `LOWE_PROJECT`. Hooks
|
|
537
|
+
from a repository's shared `.lowe/settings.json` only run after you trust them once.
|
|
538
|
+
|
|
539
|
+
## Permission modes (`--mode`)
|
|
540
|
+
|
|
541
|
+
| Mode | Reading | Editing files | Shell commands |
|
|
542
|
+
|---|---|---|---|
|
|
543
|
+
| `ask` (default) | runs | asks | routine work in the project runs; serious commands ask (below) |
|
|
544
|
+
| `accept-edits` | runs | runs | routine work runs; serious commands ask |
|
|
545
|
+
| `plan` | runs | refused | known-safe only; LOWE proposes a plan and you approve it before anything changes |
|
|
546
|
+
| `auto` | runs | runs | runs |
|
|
547
|
+
|
|
548
|
+
**Serious commands** (asked about in `ask` and `accept-edits`):
|
|
549
|
+
- using the network: `curl`, `ssh`, `git push`, and `npx`, which downloads and runs a
|
|
550
|
+
package;
|
|
551
|
+
- installing or removing packages;
|
|
552
|
+
- deleting files;
|
|
553
|
+
- stopping processes;
|
|
554
|
+
- changing system or program settings;
|
|
555
|
+
- publishing;
|
|
556
|
+
- hidden code, such as encoded commands, `eval`, or inline code that writes files or
|
|
557
|
+
connects to the network.
|
|
558
|
+
|
|
559
|
+
Looking around (`netstat`, `ps`, `--help`, logs) and running the project's own scripts,
|
|
560
|
+
builds and tests run without a question.
|
|
561
|
+
|
|
562
|
+
Questions take **one key**: `y` yes, `a` yes and don't ask again, `n` no. What "always"
|
|
563
|
+
covers depends on the risk:
|
|
564
|
+
- most commands: that kind of command (`netstat`, `npm run`);
|
|
565
|
+
- network commands: that site (`curl` to `wttr.in`);
|
|
566
|
+
- deleting, installing or changing the system: only that exact command.
|
|
567
|
+
|
|
568
|
+
`"askEveryCommand": true` in settings brings back a question for every command that is
|
|
569
|
+
not read-only.
|
|
570
|
+
|
|
571
|
+
In **every** mode, LOWE asks first for:
|
|
572
|
+
- dangerous commands: `rm -rf` on a root, home or whole folder, `sudo`, `git push --force`,
|
|
573
|
+
`git reset --hard`, `git clean -f`, disk tools, piping a download into a shell,
|
|
574
|
+
printing environment variables or secrets;
|
|
575
|
+
- files that usually hold secrets (`.env`, `*.pem`, `id_rsa`, `.ssh/`, `.npmrc`, ...);
|
|
576
|
+
- anything outside the project folder.
|
|
577
|
+
|
|
578
|
+
Without a terminal (for example in a script), such actions are refused, never run.
|
|
579
|
+
|
|
580
|
+
## Settings
|
|
581
|
+
|
|
582
|
+
| File | For |
|
|
583
|
+
|---|---|
|
|
584
|
+
| `~/.lowe/settings.json` | you, everywhere |
|
|
585
|
+
| `<project>/.lowe/settings.json` | the team (commit it) |
|
|
586
|
+
| `<project>/.lowe/settings.local.json` | you, in this project (do not commit) |
|
|
587
|
+
|
|
588
|
+
Later files add to earlier ones. Every key:
|
|
589
|
+
|
|
590
|
+
| Key | Default | | Shared file? |
|
|
591
|
+
|---|---|---|---|
|
|
592
|
+
| `defaultMode` | `ask` | `ask`, `accept-edits`, `plan` or `auto` | not `auto` |
|
|
593
|
+
| `permissions` | | `allow`, `ask`, `deny` rule lists (below) | allow: once trusted |
|
|
594
|
+
| `language` | system | `zh` or `en` | no |
|
|
595
|
+
| `budget` | `{"cny": 1}` | per task: `cny` and/or `tokens`; `0` = no limit | yes |
|
|
596
|
+
| `fallback` | Swift → Steady → Focus → Wide | LOWE models to continue on, or `false` | no |
|
|
597
|
+
| `strongModel` | your model | for `--router` / `--team` | no |
|
|
598
|
+
| `autoModel` | off | `true` or a list of LOWE models (`--auto-model`) | no |
|
|
599
|
+
| `autoLearn` | `true` | lessons and skills after tasks | may only turn it off |
|
|
600
|
+
| `knowHow` | `true` | built-in know-how | yes |
|
|
601
|
+
| `askEveryCommand` | `false` | ask before every command that is not read-only | may only turn it on |
|
|
602
|
+
| `collectTraining` | `false` | save solved tasks as training data | no |
|
|
603
|
+
| `sandbox` | `python:3.12-slim`, `bridge` | `image`, `network`, `mounts`, `env` for `--sandbox` | no |
|
|
604
|
+
| `hooks` | | commands before or after tools (see Hooks) | once trusted |
|
|
605
|
+
| `mcpServers` | | MCP servers (see MCP tools) | once trusted |
|
|
606
|
+
|
|
607
|
+
`lowe web` reads `~/.lowe/settings.json` only (`language`, `fallback`, `knowHow`).
|
|
608
|
+
|
|
609
|
+
```json
|
|
610
|
+
{
|
|
611
|
+
"defaultMode": "accept-edits",
|
|
612
|
+
"permissions": {
|
|
613
|
+
"allow": ["bash:npm run *", "edit:src/**"],
|
|
614
|
+
"ask": ["tool:write_file"],
|
|
615
|
+
"deny": ["bash:git push*", "read:secrets/**"]
|
|
616
|
+
},
|
|
617
|
+
"sandbox": { "image": "python:3.12-slim", "network": "bridge" },
|
|
618
|
+
"budget": { "cny": 0.5 },
|
|
619
|
+
"fallback": ["steady", "focus"],
|
|
620
|
+
"strongModel": "deep"
|
|
621
|
+
}
|
|
622
|
+
```
|
|
623
|
+
|
|
624
|
+
Rules are `bash:<command pattern>`, `edit:<path glob>`, `read:<path glob>` or
|
|
625
|
+
`tool:<tool name>`. For chained commands (`a && b`), an allow rule must match every part.
|
|
626
|
+
|
|
627
|
+
For safety, a repository's shared `.lowe/settings.json` cannot turn on `auto` mode, pick
|
|
628
|
+
the sandbox image, or set `fallback` or `strongModel` (they decide where your code is sent
|
|
629
|
+
and what it costs), and its allow rules only work after you trust them once.
|
|
630
|
+
|
|
631
|
+
## Sandbox (`--sandbox`)
|
|
632
|
+
|
|
633
|
+
Needs Docker Desktop (Windows, macOS) or Docker Engine (Linux). Each command runs in a
|
|
634
|
+
fresh container that only sees the project folder (at `/workspace`). Set
|
|
635
|
+
`"network": "none"` to cut off the internet. If Docker Hub is slow or blocked, set the
|
|
636
|
+
image to a mirror you trust in your own settings (for example a company registry).
|
|
637
|
+
|
|
638
|
+
## Privacy
|
|
639
|
+
|
|
640
|
+
Everything stays on your machine, except what the model needs to see, which goes to the
|
|
641
|
+
provider of the model in use. With fallback that can be another provider whose key you
|
|
642
|
+
set (LOWE says when it switches); `"fallback": false` keeps it to one. Secrets are removed from LOWE's log
|
|
643
|
+
(`~/.lowe/logs/lowe.log`) and audit log (`~/.lowe/audit.log`, one line per permission
|
|
644
|
+
decision). The values of secret environment variables (names containing KEY, TOKEN,
|
|
645
|
+
SECRET, PASSWORD) are also removed from command output before it reaches the model.
|
|
646
|
+
In `lowe web`, those values and known key formats (`sk-...`, `AKIA...`, private keys) are
|
|
647
|
+
removed from messages and uploaded files before they are stored or sent; the rest of the
|
|
648
|
+
code is kept exactly as written.
|
|
649
|
+
|
|
650
|
+
The web app's Markdown, sanitising and code colours come from marked (MIT), DOMPurify
|
|
651
|
+
(Apache-2.0 / MPL-2.0) and highlight.js (BSD-3-Clause), saved in `lowe_web/static/vendor`
|
|
652
|
+
with their licences, so the page loads nothing from the internet.
|
|
653
|
+
|
|
654
|
+
With `--remote`, the project's files and command output go from that machine to yours
|
|
655
|
+
over SSH, and from yours to the model provider as above. With MCP servers, what the model
|
|
656
|
+
sends to a tool goes to that server (often a local program, sometimes a web service it
|
|
657
|
+
calls).
|
|
658
|
+
|
|
659
|
+
## Troubleshooting
|
|
660
|
+
|
|
661
|
+
Installing: see [INSTALL.md](INSTALL.md#troubleshooting). Using:
|
|
662
|
+
|
|
663
|
+
| Problem | Fix |
|
|
664
|
+
|---|---|
|
|
665
|
+
| A task stops with "budget reached" | Raise it: `--budget-cny 3`, or `"budget": {"cny": 3}`. `/cost` shows what was spent. |
|
|
666
|
+
| "insufficient balance" / "invalid key" | Top up or fix the key. With another provider's key set, LOWE continues there by itself. |
|
|
667
|
+
| LOWE runs the wrong test command | Edit the `## Commands` section of `LOWE.md` in the project. |
|
|
668
|
+
| LOWE keeps asking before the same command | Choose "always" when asked, or add `"allow": ["bash:npm run *"]`. |
|
|
669
|
+
| Chinese files come back garbled | Should not happen: LOWE reads UTF-8, then GB18030 (GBK), and writes back in the same encoding and line endings. Please report it with the file. |
|
|
670
|
+
| `lowe web` shows "Open the link that lowe web printed" | Open the link with `?token=` that the terminal shows; `lowe web --new-link` makes a new one. |
|
|
671
|
+
| Ctrl+C does nothing on Windows | Update; LOWE turns Ctrl+C back on at start. In an IDE terminal, try Windows Terminal. |
|
|
672
|
+
| An MCP server is listed as "not started" | Run its command by hand to see the error; check `/mcp`. |
|
|
673
|
+
|
|
674
|
+
## Develop
|
|
675
|
+
|
|
676
|
+
```bash
|
|
677
|
+
python -m venv .venv
|
|
678
|
+
.venv/Scripts/python -m pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -e ".[dev]"
|
|
679
|
+
.venv/Scripts/python -m pytest # offline tests (fake model)
|
|
680
|
+
.venv/Scripts/python -m pytest -m live # real DeepSeek, Docker, SSH, MCP, Edge and VS Code
|
|
681
|
+
.venv/Scripts/ruff check . && .venv/Scripts/mypy
|
|
682
|
+
cd vscode && npm install && npm test # the VS Code extension, in the installed VS Code
|
|
683
|
+
```
|