@wukonglabs/wukong 0.0.2 → 0.0.4

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 CHANGED
@@ -1,85 +1,81 @@
1
1
  # @wukonglabs/wukong
2
2
 
3
- > CI-First AI Agent CLI —— 极简但功能完整的 AI 编程助手
3
+ > CI-First AI Agent CLI a minimal yet full-featured AI coding assistant
4
4
 
5
- Wukong(悟空)是一个命令行 AI 编程 Agent,具备 ReAct 推理循环、内置工具集、技能系统和会话持久化。背后引擎为 [`@wukonglabs/wukong-agent-sdk`](https://www.npmjs.com/package/@wukonglabs/wukong-agent-sdk)
5
+ Wukong is a CLI AI coding agent with a ReAct reasoning loop, built-in tools, a skill system, and session persistence. Powered by [`@wukonglabs/wukong-agent-sdk`](https://www.npmjs.com/package/@wukonglabs/wukong-agent-sdk).
6
6
 
7
- ## 安装
7
+ ## Install
8
8
 
9
9
  ```bash
10
- # 全局安装,提供 wukong 命令
11
- npm install -g @wukonglabs/wukong
12
-
13
- # 或免安装直接运行
14
- npx @wukonglabs/wukong agent -m "你好"
10
+ npm install -g @wukonglabs/wukong@latest
15
11
  ```
16
12
 
17
- > 要求 Node.js >= 22。首次安装会编译 Tree-sitter native addon,需本机具备 C++ 工具链(macOS Xcode CLT,Linux `python3 make g++`)。
13
+ > Requires Node.js >= 22. Pure JS/TS, no native addons install and run, no C++ toolchain needed.
18
14
 
19
- ## 首次运行(交互式配置)
15
+ ## First Run (Interactive Setup)
20
16
 
21
- 直接运行 `wukong` 进入交互模式。若尚未配置任何模型 Provider,会自动进入**交互式配置向导**:
17
+ Run `wukong` directly. If no model provider is configured, an interactive wizard starts:
22
18
 
23
19
  ```text
24
- 🔧 未检测到模型配置,进入交互式配置向导
25
- 请选择模型 Provider 类型:
26
- 1) OpenAI(官方)
27
- 2) AnthropicClaude 官方)
28
- 3) OpenAI 兼容(自定义 baseUrl,如 DeepSeek / 通义 / 本地 vLLM 等)
29
- 输入序号 [1]: 3
30
- 输入 API Key: sk-xxx
31
- 输入 Base URL(必填,如 https://api.deepseek.com/v1): https://api.deepseek.com/v1
32
- 输入模型名: deepseek-chat
33
- 配置已保存至 /Users/you/.wukong/wukong.json
20
+ 🔧 No model config detected — starting interactive setup
21
+ Choose a provider type:
22
+ 1) OpenAI (Official)
23
+ 2) Anthropic (Claude Official)
24
+ 3) OpenAI-Compatible (custom baseUrl, e.g. DeepSeek / vLLM)
25
+ Enter choice [1]: 3
26
+ API Key: sk-xxx
27
+ Base URL (required, e.g. https://api.deepseek.com/v1): https://api.deepseek.com/v1
28
+ Model name: deepseek-chat
29
+ Config saved to /Users/you/.wukong/wukong.json
34
30
  ```
35
31
 
36
- 向导收集的配置会写入 `~/.wukong/wukong.json`(文件权限 `0600`),后续运行直接读取,无需再次配置。若不想用向导,也可按下方「配置」章节**手动配置**。
32
+ Config is written to `~/.wukong/wukong.json` (permissions `0600`). You can also manually configure as described below.
37
33
 
38
- > 非交互环境(管道 / CI)不会弹向导,请改用环境变量或配置文件(见下)。
34
+ > Non-interactive environments (pipes / CI) skip the wizard; use env vars or a config file instead.
39
35
 
40
- ## 使用
36
+ ## Usage
41
37
 
42
38
  ```bash
43
- # 交互模式
39
+ # Interactive mode
44
40
  wukong
45
41
 
46
- # 单次调用
47
- wukong agent --message "帮我查看 package.json"
42
+ # Single-shot
43
+ wukong agent --message "Check my package.json"
48
44
 
49
- # JSON 输出(便于程序化调用)
50
- wukong agent --json --message "列出当前目录的文件"
45
+ # JSON output (for programmatic use)
46
+ wukong agent --json --message "List files in current directory"
51
47
 
52
- # 复用会话(多轮对话)
53
- wukong agent --message "继续上次的任务" --session-id "my_session"
48
+ # Reuse session (multi-turn)
49
+ wukong agent --message "Continue the last task" --session-id "my_session"
54
50
 
55
- # 外部注入 system prompt
56
- wukong agent --message "评审这个 PR" --system-prompt "你是代码评审专家"
51
+ # Custom system prompt
52
+ wukong agent --message "Review this PR" --system-prompt "You are a code reviewer"
57
53
 
58
- # 图片识别(需配置 vision
59
- wukong agent --message "识别这张图片" --images https://example.com/shot.png
54
+ # Image recognition (requires vision config)
55
+ wukong agent --message "Describe this image" --images https://example.com/shot.png
60
56
  ```
61
57
 
62
- ### CLI 参数
58
+ ### CLI Options
63
59
 
64
- | 参数 | 缩写 | 说明 |
65
- | ----------------- | ---- | --------------------------- |
66
- | `agent` | - | 子命令,进入单次调用模式 |
67
- | `--message` | `-m` | 发送的消息内容 |
68
- | `--session-id` | `-s` | 会话 ID(默认 `cli:local`) |
69
- | `--system-prompt` | - | 外部注入的 system prompt |
70
- | `--images` | - | 图片 URL(可多个) |
71
- | `--json` | - | JSON 格式输出 |
72
- | `--test` | - | 测试模式,发送测试消息后退出|
60
+ | Option | Short | Description |
61
+ | ----------------- | ----- | ---------------------------------------- |
62
+ | `agent` | - | Subcommand: single-shot mode |
63
+ | `--message` | `-m` | Message content |
64
+ | `--session-id` | `-s` | Session ID (default: `cli:local`) |
65
+ | `--system-prompt` | - | Injected system prompt |
66
+ | `--images` | - | Image URLs (multiple allowed) |
67
+ | `--json` | - | JSON output |
68
+ | `--test` | - | Test mode: send test message then exit |
73
69
 
74
- ## 配置
70
+ ## Configuration
75
71
 
76
- 除交互式向导外,也可手动配置。优先级:`CLI 参数 > 环境变量 (.env) > 配置文件 (wukong.json) > 默认值`
72
+ Priority: `CLI args > env vars (.env) > config file (wukong.json) > defaults`
77
73
 
78
- 配置文件查找顺序:`$WUKONG_CONFIG_PATH` → `./wukong.json` → `~/.wukong/wukong.json`
74
+ Config file lookup order: `$WUKONG_CONFIG_PATH` → `./wukong.json` → `~/.wukong/wukong.json`
79
75
 
80
- ### 手动写配置文件(最小配置)
76
+ ### Minimal Config File
81
77
 
82
- `~/.wukong/wukong.json`(全局)或项目根 `./wukong.json`(仅当前项目)写入,只需 API Key 和 Base URL 即可运行:
78
+ Place at `~/.wukong/wukong.json` (global) or `./wukong.json` (project):
83
79
 
84
80
  ```json
85
81
  {
@@ -95,24 +91,24 @@ wukong agent --message "识别这张图片" --images https://example.com/shot.pn
95
91
  }
96
92
  ```
97
93
 
98
- 支持任何 OpenAI 兼容端点,也支持 Anthropic Claude。未显式设置 `type` 时会根据 model / baseUrl 自动推断(`openai` / `openai-compatible` / `anthropic`)。
94
+ Works with any OpenAI-compatible endpoint and Anthropic Claude. Provider type is auto-detected from model name / baseUrl.
99
95
 
100
- ### 用环境变量(推荐,避免明文密钥)
96
+ ### Environment Variables (Recommended)
101
97
 
102
98
  ```bash
103
99
  OPENAI_API_KEY=sk-xxx # → providers.openai.apiKey
104
- LLM_BASE_URL=https://api.xxx/v1 # → providers.openai.baseUrl(需与 OPENAI_API_KEY 同时设置才生效)
100
+ LLM_BASE_URL=https://api.xxx/v1 # → providers.openai.baseUrl
105
101
  LLM_MODEL=gpt-4o # → agent.defaultModel
106
102
  ANTHROPIC_API_KEY=sk-ant-xxx # → providers.anthropic.apiKey
107
103
  ```
108
104
 
109
- 配置文件中的字符串值也支持 `${VAR_NAME}` 模板引用环境变量。
105
+ Config file string values support `${VAR_NAME}` templates referencing env vars.
110
106
 
111
- > 完整配置项(多 Provider 切换、VisionSkills 技能系统等)请见[项目根 README](https://cnb.cool/O.o/wukong)
107
+ > Full config options (multi-provider, Vision, Skills) [root README](https://cnb.cool/O.o/wukong).
112
108
 
113
- ## Skills(技能系统)
109
+ ## Skills
114
110
 
115
- 通过 `SKILL.md` 文件为 Agent 注入领域知识与自定义工具,无需改源码。Skills `<安装目录>/skills/bundled/`、`~/.wukong/skills/`、`<项目>/skills/` 及配置指定目录自动加载(后者优先级更高,同名覆盖)。详见项目根 README
111
+ Inject domain knowledge and custom tools via `SKILL.md` files no source changes needed. Skills auto-load from `<install-dir>/skills/bundled/`, `~/.wukong/skills/`, `<project>/skills/`, and configured directories (later paths override earlier ones by name). See root README for details.
116
112
 
117
113
  ## License
118
114
 
package/dist/cli/help.js CHANGED
@@ -51,7 +51,7 @@ Wukong (悟空) — CI-First AI Agent CLI
51
51
  工具权限(安全相关):
52
52
  --profile <name> 工具权限 profile(覆盖 wukong.json 的 tools.profile)
53
53
  可选值: minimal | chat | coding(默认) | messaging | full
54
- chat → 只读工具集(read/list/grep/search/git/skills)
54
+ chat → 只读工具集(read/list/grep/search/skills)
55
55
  无 exec_command/write_file/web_fetch,适合对话模式,
56
56
  防止被社工诱导发 curl 外发敏感信息
57
57
  coding → 完整开发权限(默认)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wukonglabs/wukong",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "CI-First AI Agent CLI — 极简但功能完整的 AI 编程助手(ReAct 循环 + 内置工具 + 技能系统)",
5
5
  "bin": {
6
6
  "wukong": "dist/index.js"
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
- "@wukonglabs/wukong-agent-sdk": "0.0.2"
34
+ "@wukonglabs/wukong-agent-sdk": "0.0.4"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^25.3.2",