@ai-setting/roy-agent-cli 1.4.0 → 1.4.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 +43 -84
- package/dist/bin/roy.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,64 +1,56 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @ai-setting/roy-agent-cli
|
|
2
2
|
|
|
3
3
|
Command-line interface for roy-agent. Provides non-interactive command execution.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 工具链协作
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
| 工具 | 职责 | 使用场景 |
|
|
8
|
+
|------|------|----------|
|
|
9
|
+
| **pnpm** | 包管理、依赖安装、发布 | `pnpm install`, `pnpm publish` |
|
|
10
|
+
| **bunup** | SDK bundle 编译 | `bun run build` |
|
|
11
|
+
| **build-cli-dev.ts** | Dev 构建(源码 sourcemap) | `bun run build:cli:dev:single` |
|
|
12
|
+
| **build-cli-prod.ts** | Prod 构建(standalone) | `bun run build:cli:prod:single` |
|
|
11
13
|
|
|
12
14
|
## Build
|
|
13
15
|
|
|
14
|
-
###
|
|
16
|
+
### 构建模式
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
| 模式 | 命令 | 产物 | 说明 |
|
|
19
|
+
|------|------|------|------|
|
|
20
|
+
| **SDK Bundle** | `bun run build` | `dist/index.js`, `dist/bin/roy.js` | bunup 编译,用于 npm 发布 |
|
|
21
|
+
| **Dev** | `bun run build:cli:dev:single` | `dist/bin/roy.js` + sourcemap | 本地平台,调试用 |
|
|
22
|
+
| **Prod Single** | `bun run build:cli:prod:single` | `dist/roy-agent-*/bin/roy` | 本地平台,standalone |
|
|
23
|
+
| **Prod All** | `bun run build:cli:prod` | `dist/roy-agent-*/bin/roy` | 全平台 5 个,standalone |
|
|
17
24
|
|
|
18
|
-
|
|
19
|
-
# 1. Build core first
|
|
20
|
-
cd packages/core
|
|
21
|
-
bun run build:core:prod:single --pack --check
|
|
22
|
-
npm publish --access public --registry=https://npm.pkg.github.com/
|
|
23
|
-
|
|
24
|
-
# 2. Then build CLI
|
|
25
|
-
cd ../cli
|
|
26
|
-
bun run build:cli:prod:single --pack --check
|
|
27
|
-
```
|
|
25
|
+
### Dev 模式
|
|
28
26
|
|
|
29
|
-
|
|
27
|
+
生成带有 **sourcemap** 的 bundle,日志可显示准确的 `.ts` 文件路径和行号。
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| Dev Single | `bun run build:cli:dev:single` | `roy.js` | Current platform, with sourcemap |
|
|
34
|
-
| Dev All | `bun run build:cli:dev` | `roy.js` | All platforms, with sourcemap |
|
|
35
|
-
| Prod Single | `bun run build:cli:prod:single` | `roy` | Current platform, standalone exe |
|
|
36
|
-
| Prod All | `bun run build:cli:prod` | `roy` | All platforms, standalone exe |
|
|
29
|
+
```bash
|
|
30
|
+
bun run build:cli:dev:single
|
|
37
31
|
|
|
38
|
-
|
|
32
|
+
# 运行
|
|
33
|
+
bun packages/cli/dist/bin/roy.js act "hello"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Prod 模式
|
|
39
37
|
|
|
40
|
-
|
|
41
|
-
|------|-------------|
|
|
42
|
-
| `--single` | Build for current platform only |
|
|
43
|
-
| `--pack` | Create npm tarball after build |
|
|
44
|
-
| `--publish` | Pack and publish to npm |
|
|
45
|
-
| `--check` | Verify tarball contents |
|
|
38
|
+
生成 **standalone 可执行文件**。
|
|
46
39
|
|
|
47
|
-
|
|
40
|
+
```bash
|
|
41
|
+
# 本地平台
|
|
42
|
+
bun run build:cli:prod:single
|
|
48
43
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
4. **Compile** - Uses `bun compile` to create standalone executable
|
|
44
|
+
# 全平台(linux-x64, linux-arm64, darwin-x64, darwin-arm64, windows-x64)
|
|
45
|
+
bun run build:cli:prod
|
|
46
|
+
```
|
|
53
47
|
|
|
54
48
|
## Development
|
|
55
49
|
|
|
56
|
-
|
|
50
|
+
源码运行:
|
|
57
51
|
|
|
58
52
|
```bash
|
|
59
|
-
bun
|
|
60
|
-
# or
|
|
61
|
-
bun run src/bin/roy.ts
|
|
53
|
+
bun packages/cli/src/bin/roy.ts
|
|
62
54
|
```
|
|
63
55
|
|
|
64
56
|
## Usage
|
|
@@ -77,50 +69,17 @@ roy act "任务" --model gpt-4 --quiet
|
|
|
77
69
|
## Publishing
|
|
78
70
|
|
|
79
71
|
```bash
|
|
80
|
-
#
|
|
81
|
-
bun run build
|
|
72
|
+
# 1. SDK bundle 编译(bunup)
|
|
73
|
+
bun run build
|
|
82
74
|
|
|
83
|
-
#
|
|
84
|
-
|
|
75
|
+
# 2. 发布到 npm
|
|
76
|
+
cd packages/cli
|
|
77
|
+
pnpm publish --access public
|
|
85
78
|
```
|
|
86
79
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Current: **1.2.8**
|
|
90
|
-
|
|
91
|
-
To publish a new version:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# 1. Update version in package.json
|
|
95
|
-
vi package.json
|
|
96
|
-
|
|
97
|
-
# 2. Build and pack
|
|
98
|
-
bun run build:cli:prod:single --pack --check
|
|
99
|
-
|
|
100
|
-
# 3. Verify tarball
|
|
101
|
-
tar -tzf gddzhaokun-roy-agent-cli-*.tgz | head -20
|
|
102
|
-
|
|
103
|
-
# 4. Publish
|
|
104
|
-
npm publish --access public --registry=https://npm.pkg.github.com/
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
## Troubleshooting
|
|
108
|
-
|
|
109
|
-
### Type errors when building
|
|
110
|
-
|
|
111
|
-
Ensure `@gddzhaokun/roy-agent-core` is built and published first:
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
cd packages/core
|
|
115
|
-
bun run build:core:prod:single
|
|
116
|
-
npm publish --access public --registry=https://npm.pkg.github.com/
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### CLI commands not working after install
|
|
120
|
-
|
|
121
|
-
Reinstall dependencies:
|
|
80
|
+
## Dependencies
|
|
122
81
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
82
|
+
- `@ai-setting/roy-agent-core` - Core SDK
|
|
83
|
+
- `@ai-setting/roy-agent-coder-harness` - LSP harness
|
|
84
|
+
- `chalk` - Terminal colors
|
|
85
|
+
- `yargs` - CLI argument parsing
|
package/dist/bin/roy.js
CHANGED
|
@@ -7220,7 +7220,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7220
7220
|
var require_package = __commonJS((exports, module) => {
|
|
7221
7221
|
module.exports = {
|
|
7222
7222
|
name: "@ai-setting/roy-agent-cli",
|
|
7223
|
-
version: "1.4.
|
|
7223
|
+
version: "1.4.2",
|
|
7224
7224
|
type: "module",
|
|
7225
7225
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7226
7226
|
main: "./dist/index.js",
|
package/dist/index.js
CHANGED
|
@@ -7219,7 +7219,7 @@ var require_dist = __commonJS((exports) => {
|
|
|
7219
7219
|
var require_package = __commonJS((exports, module) => {
|
|
7220
7220
|
module.exports = {
|
|
7221
7221
|
name: "@ai-setting/roy-agent-cli",
|
|
7222
|
-
version: "1.4.
|
|
7222
|
+
version: "1.4.2",
|
|
7223
7223
|
type: "module",
|
|
7224
7224
|
description: "CLI for roy-agent - Non-interactive command execution",
|
|
7225
7225
|
main: "./dist/index.js",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-setting/roy-agent-cli",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CLI for roy-agent - Non-interactive command execution",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"vscode-json-languageserver": "^1.3.4",
|
|
31
31
|
"yargs": "^17.7.2",
|
|
32
32
|
"zod-to-json-schema": "^3.25.2",
|
|
33
|
-
"@ai-setting/roy-agent-core": "1.4.
|
|
34
|
-
"@ai-setting/roy-agent-coder-harness": "1.1.
|
|
33
|
+
"@ai-setting/roy-agent-core": "1.4.1",
|
|
34
|
+
"@ai-setting/roy-agent-coder-harness": "1.1.1"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^20.10.0",
|