@rzx/ohs 0.1.0 → 1.0.2
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 +120 -0
- package/dist/frontend/index.js +3 -3
- package/dist/frontend/index.js.map +49 -49
- package/dist/index.js +2310 -1377
- package/dist/index.js.map +224 -211
- package/dist/migrations/0000_session_runtime.sql +68 -68
- package/dist/migrations/0001_event_sequence.sql +8 -8
- package/dist/migrations/0002_cron.sql +33 -33
- package/dist/migrations/0011_storage_format.sql +6 -6
- package/dist/migrations/0013_attachments.sql +20 -20
- package/dist/migrations/0014_session_input_attachments.sql +45 -45
- package/dist/migrations/0015_attachment_representations.sql +22 -22
- package/dist/migrations/0016_attachment_lifecycle.sql +16 -16
- package/dist/migrations/meta/_journal.json +23 -23
- package/package.json +34 -14
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @rzx/ohs
|
|
2
|
+
|
|
3
|
+
OpenHarness-ts 终端 CLI:在终端里跑 AI Agent。默认进入交互式 TUI(需 [Bun](https://bun.sh)),也可一次性打印结果后退出。会话由本机 daemon 持久化,可与 Desktop 等客户端共用同一后端。
|
|
4
|
+
|
|
5
|
+
命令行入口:`ohs` 与 `openharness`(等价)。
|
|
6
|
+
|
|
7
|
+
## 要求
|
|
8
|
+
|
|
9
|
+
- Node.js >= 20
|
|
10
|
+
- 交互式 TUI:额外安装 [Bun](https://bun.sh)
|
|
11
|
+
- 可选:Docker(启用 sandbox 时)
|
|
12
|
+
|
|
13
|
+
## 安装
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g @rzx/ohs
|
|
17
|
+
# 或
|
|
18
|
+
pnpm add -g @rzx/ohs
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
验证:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ohs --version
|
|
25
|
+
ohs doctor
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 快速开始
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# 首次配置(Provider / API Key / 模型)
|
|
32
|
+
ohs setup
|
|
33
|
+
|
|
34
|
+
# 或手动登录
|
|
35
|
+
ohs auth login <provider> <api-key>
|
|
36
|
+
ohs provider list
|
|
37
|
+
ohs provider use <name> -m <model>
|
|
38
|
+
|
|
39
|
+
# 交互式 TUI(默认;会 attach 或启动本机 daemon)
|
|
40
|
+
ohs
|
|
41
|
+
|
|
42
|
+
# 单次提问后退出
|
|
43
|
+
ohs "explain this codebase"
|
|
44
|
+
ohs -p "explain this codebase"
|
|
45
|
+
|
|
46
|
+
# 只检查配置,不调模型
|
|
47
|
+
ohs --dry-run
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
用户配置与数据默认在 `~/.openharness-ts/`(例如 `settings.json`、daemon registry、会话库)。
|
|
51
|
+
|
|
52
|
+
## 常用用法
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
ohs -m <model> "你的问题"
|
|
56
|
+
ohs --provider <name> --permission-mode full_auto "重构这段代码"
|
|
57
|
+
ohs --cwd /path/to/project
|
|
58
|
+
ohs --tui "带初始提示打开 TUI"
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### 主要选项
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
| 选项 | 说明 |
|
|
65
|
+
| --------------------------------- | ---------------------------------- |
|
|
66
|
+
| `-p, --print` | 经 daemon 打印结果后退出(有 prompt 时默认即此模式) |
|
|
67
|
+
| `--tui` | 显式启动 TUI(无 prompt 时默认已是 TUI) |
|
|
68
|
+
| `-m, --model` | 模型名 |
|
|
69
|
+
| `--provider` | 强制指定 Provider |
|
|
70
|
+
| `--permission-mode` | `default` | `plan` | `full_auto` |
|
|
71
|
+
| `--max-turns` | 最大 agent 轮次 |
|
|
72
|
+
| `--effort` | `low` | `medium` | `high` |
|
|
73
|
+
| `--no-plugins` | 本次会话不加载已安装插件贡献 |
|
|
74
|
+
| `--dangerously-skip-permissions` | 跳过权限确认 |
|
|
75
|
+
| `--dry-run` | 预览解析后的配置,不调模型 |
|
|
76
|
+
| `--daemon-url` / `--daemon-token` | 连接到指定 daemon,而不是本机自动启动 |
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
完整参数见 `ohs --help`。
|
|
80
|
+
|
|
81
|
+
## 常用子命令
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
ohs setup
|
|
85
|
+
ohs doctor
|
|
86
|
+
ohs auth login <provider> <api-key>
|
|
87
|
+
ohs auth status
|
|
88
|
+
ohs provider list|use|add|edit|remove
|
|
89
|
+
ohs mcp list|add|remove
|
|
90
|
+
ohs plugin list|install|uninstall|enable|disable
|
|
91
|
+
ohs sandbox on|off|status|doctor
|
|
92
|
+
ohs daemon start|status|stop|install|uninstall
|
|
93
|
+
ohs config show
|
|
94
|
+
ohs config set <key> <value>
|
|
95
|
+
ohs workflow list|status|validate|template|reconcile|cancel
|
|
96
|
+
ohs channels status|serve
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
开启登录后自动拉起 daemon(可选):
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
ohs daemon install
|
|
103
|
+
# 或
|
|
104
|
+
ohs config set daemon.autoStart true
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## 说明
|
|
108
|
+
|
|
109
|
+
- **TUI** 需要 Bun;没有 Bun 时可用 `-p` / 带 prompt 的 print 模式。
|
|
110
|
+
- 默认会连接已有本机 daemon;没有可用进程时会按需启动。Desktop 等客户端也可连同一 daemon,共享会话状态。
|
|
111
|
+
- 原生依赖含 `sharp`、`better-sqlite3`、`node-pty`;全局安装时会由 npm/pnpm 一并安装对应平台包。
|
|
112
|
+
- 正式版本随 GitHub tag `vX.Y.Z` 发布,和 Desktop 安装包同一版本。详见仓库 `docs/release-process.md`。
|
|
113
|
+
|
|
114
|
+
## 文档与源码
|
|
115
|
+
|
|
116
|
+
- 源码仓库:[https://github.com/rzx007/openharness-ts](https://github.com/rzx007/openharness-ts)
|
|
117
|
+
- 项目文档:[https://github.com/rzx007/openharness-ts/tree/main/docs](https://github.com/rzx007/openharness-ts/tree/main/docs)
|
|
118
|
+
- 问题反馈:[https://github.com/rzx007/openharness-ts/issues](https://github.com/rzx007/openharness-ts/issues)
|
|
119
|
+
|
|
120
|
+
本地从源码开发请看仓库根目录 `README.md`。
|
package/dist/frontend/index.js
CHANGED
|
@@ -7574,9 +7574,9 @@ var init_selection = () => {};
|
|
|
7574
7574
|
// ../frontend/src/App.tsx
|
|
7575
7575
|
var exports_App = {};
|
|
7576
7576
|
__export(exports_App, {
|
|
7577
|
-
|
|
7577
|
+
App: () => App,
|
|
7578
7578
|
createJobsPanelCallbacks: () => createJobsPanelCallbacks,
|
|
7579
|
-
|
|
7579
|
+
shouldOpenJobsPanel: () => shouldOpenJobsPanel
|
|
7580
7580
|
});
|
|
7581
7581
|
import { useCallback as useCallback7, useEffect as useEffect10, useMemo as useMemo7, useRef as useRef9, useState as useState13 } from "react";
|
|
7582
7582
|
import { useKeyboard as useKeyboard8, useRenderer, useTerminalDimensions as useTerminalDimensions5 } from "@opentui/react";
|
|
@@ -8030,4 +8030,4 @@ try {
|
|
|
8030
8030
|
process.exit(1);
|
|
8031
8031
|
}
|
|
8032
8032
|
|
|
8033
|
-
//# debugId=
|
|
8033
|
+
//# debugId=355DB2EBFACF8ADB64756E2164756E21
|