Skip to content

Commit ec78160

Browse files
authored
Merge pull request #13 from echoVic/feat/upgrade-agent
Feat/upgrade agent
2 parents e5499bc + 618ecae commit ec78160

286 files changed

Lines changed: 21506 additions & 15539 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 27 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Setup Bun
2424
uses: oven-sh/setup-bun@v2
2525
with:
26-
bun-version: latest
26+
bun-version: 1.3.11
2727

2828
- name: Verify Bun runtime
2929
run: bun --version
@@ -33,41 +33,26 @@ jobs:
3333
with:
3434
node-version: "20.x"
3535

36-
- name: Install pnpm
37-
run: npm install -g pnpm@9
38-
39-
- name: Get pnpm store directory
40-
shell: bash
41-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
42-
43-
- name: Setup pnpm cache
44-
uses: actions/cache@v4
45-
with:
46-
path: ${{ env.STORE_PATH }}
47-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
48-
restore-keys: |
49-
${{ runner.os }}-pnpm-store-
50-
5136
- name: Install dependencies
52-
run: pnpm install --frozen-lockfile
37+
run: bun install --frozen-lockfile
5338

5439
- name: Build CLI package
55-
run: pnpm build:cli
40+
run: bun run build:cli
5641

5742
- name: Run CLI type check
58-
run: pnpm type-check
43+
run: bun run type-check
5944

6045
- name: Run web type check
61-
run: pnpm type-check:web
46+
run: bun run type-check:web
6247

6348
- name: Run web session lint
64-
run: pnpm lint:web
49+
run: bun run lint:web
6550

6651
- name: Run web regression tests
67-
run: pnpm test:web
52+
run: bun run test:web
6853

6954
- name: Build all packages
70-
run: pnpm build
55+
run: bun run build
7156

7257
core-headless-gate:
7358
name: Headless Core Gate
@@ -80,7 +65,7 @@ jobs:
8065
- name: Setup Bun
8166
uses: oven-sh/setup-bun@v2
8267
with:
83-
bun-version: latest
68+
bun-version: 1.3.11
8469

8570
- name: Verify Bun runtime
8671
run: bun --version
@@ -90,29 +75,14 @@ jobs:
9075
with:
9176
node-version: "20.x"
9277

93-
- name: Install pnpm
94-
run: npm install -g pnpm@9
95-
96-
- name: Get pnpm store directory
97-
shell: bash
98-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
99-
100-
- name: Setup pnpm cache
101-
uses: actions/cache@v4
102-
with:
103-
path: ${{ env.STORE_PATH }}
104-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
105-
restore-keys: |
106-
${{ runner.os }}-pnpm-store-
107-
10878
- name: Install dependencies
109-
run: pnpm install --frozen-lockfile
79+
run: bun install --frozen-lockfile
11080

11181
- name: Build CLI package
112-
run: pnpm build:cli
82+
run: bun run build:cli
11383

11484
- name: Run headless core regression suite
115-
run: pnpm test:headless-core
85+
run: bun run test:headless-core
11686

11787
coverage:
11888
name: Test Coverage
@@ -126,7 +96,7 @@ jobs:
12696
- name: Setup Bun
12797
uses: oven-sh/setup-bun@v2
12898
with:
129-
bun-version: latest
99+
bun-version: 1.3.11
130100

131101
- name: Verify Bun runtime
132102
run: bun --version
@@ -136,29 +106,14 @@ jobs:
136106
with:
137107
node-version: "20.x"
138108

139-
- name: Install pnpm
140-
run: npm install -g pnpm@9
141-
142-
- name: Get pnpm store directory
143-
shell: bash
144-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
145-
146-
- name: Setup pnpm cache
147-
uses: actions/cache@v4
148-
with:
149-
path: ${{ env.STORE_PATH }}
150-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
151-
restore-keys: |
152-
${{ runner.os }}-pnpm-store-
153-
154109
- name: Install dependencies
155-
run: pnpm install --frozen-lockfile
110+
run: bun install --frozen-lockfile
156111

157112
- name: Build CLI package
158-
run: pnpm build:cli
113+
run: bun run build:cli
159114

160115
- name: Run tests with coverage
161-
run: pnpm --filter blade-code test:coverage
116+
run: bun run --filter blade-code test:coverage
162117

163118
- name: Upload coverage to Codecov
164119
uses: codecov/codecov-action@v4
@@ -189,7 +144,7 @@ jobs:
189144
- name: Setup Bun
190145
uses: oven-sh/setup-bun@v2
191146
with:
192-
bun-version: latest
147+
bun-version: 1.3.11
193148

194149
- name: Verify Bun runtime
195150
run: bun --version
@@ -199,32 +154,17 @@ jobs:
199154
with:
200155
node-version: "20.x"
201156

202-
- name: Install pnpm
203-
run: npm install -g pnpm@9
204-
205-
- name: Get pnpm store directory
206-
shell: bash
207-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
208-
209-
- name: Setup pnpm cache
210-
uses: actions/cache@v4
211-
with:
212-
path: ${{ env.STORE_PATH }}
213-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
214-
restore-keys: |
215-
${{ runner.os }}-pnpm-store-
216-
217157
- name: Install dependencies
218-
run: pnpm install --frozen-lockfile
158+
run: bun install --frozen-lockfile
219159

220160
- name: Build CLI package
221-
run: pnpm build:cli
161+
run: bun run build:cli
222162

223163
- name: Run security tests
224-
run: pnpm --filter blade-code test:security
164+
run: bun run --filter blade-code test:security
225165

226-
- name: Run npm audit
227-
run: pnpm audit --audit-level=high || true
166+
- name: Run Bun audit
167+
run: bun audit --audit-level=high || true
228168

229169
cross-platform-smoke:
230170
name: Cross Platform Smoke (${{ matrix.os }})
@@ -240,7 +180,7 @@ jobs:
240180
- name: Setup Bun
241181
uses: oven-sh/setup-bun@v2
242182
with:
243-
bun-version: latest
183+
bun-version: 1.3.11
244184

245185
- name: Verify Bun runtime
246186
run: bun --version
@@ -250,29 +190,14 @@ jobs:
250190
with:
251191
node-version: "20.x"
252192

253-
- name: Install pnpm
254-
run: npm install -g pnpm@9
255-
256-
- name: Get pnpm store directory
257-
shell: bash
258-
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
259-
260-
- name: Setup pnpm cache
261-
uses: actions/cache@v4
262-
with:
263-
path: ${{ env.STORE_PATH }}
264-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
265-
restore-keys: |
266-
${{ runner.os }}-pnpm-store-
267-
268193
- name: Install dependencies
269-
run: pnpm install --frozen-lockfile
194+
run: bun install --frozen-lockfile
270195

271196
- name: Build all packages
272-
run: pnpm build
197+
run: bun run build
273198

274199
- name: Test CLI help
275-
run: pnpm --filter blade-code start -- --help
200+
run: bun run --filter blade-code start -- --help
276201

277202
- name: Test headless help
278-
run: pnpm --filter blade-code start -- --headless /help
203+
run: bun run --filter blade-code start -- --headless /help

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ node_modules/
33
dist/
44
bundle/
55

6-
# pnpm 相关文件
6+
# 包管理器缓存
77
.pnpm/
88
.pnpm-store/
99

10-
# 锁定文件 (保留 pnpm-lock.yaml,但忽略其他)
10+
# 锁定文件(bun.lock 提交到仓库,忽略其他)
1111
yarn.lock
1212
package-lock.json
1313

@@ -56,6 +56,7 @@ coverage/
5656

5757
# 临时文件
5858
.tmp/
59+
.worktrees/
5960
*.tmp
6061
*.temp
6162

@@ -70,6 +71,7 @@ blade-context/
7071

7172
# Local settings
7273
.blade/settings.local.json
74+
.blade/benchmarks/
7375
.claude/settings.local.json
7476

7577
# Monorepo - 各包的构建输出
@@ -83,3 +85,4 @@ packages/vscode/*.vsix
8385
# Web 构建缓存
8486
packages/web/.vite/
8587
packages/cli/web/.vite/
88+
.gstack/

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
only-built-dependencies=@vscode/ripgrep esbuild node-pty
1+
registry=https://registry.npmjs.org/

BLADE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ always respond in Chinese
44

55
## 项目概述
66

7-
**Blade Code** 是一个基于 React + Ink 构建的智能 AI 编程助手 CLI 工具,使用 TypeScript 开发。项目采用 **pnpm workspace monorepo** 架构。
7+
**Blade Code** 是一个基于 React + Ink 构建的智能 AI 编程助手 CLI 工具,使用 TypeScript 开发。项目采用 **Bun workspace monorepo** 架构。
88

99
- **项目类型**: CLI 工具(TUI 应用)+ Web UI + VSCode 扩展
1010
- **主要语言**: TypeScript
11-
- **运行时**: Node.js >=20.0.0(开发使用 Bun)
11+
- **运行时**: Node.js >=20.0.0(开发使用 Bun 1.3.11
1212
- **UI 框架**: React 19 + Ink(终端 UI)/ React 19 + Vite(Web UI)
1313
- **状态管理**: Zustand
1414
- **配置管理**: 支持 JSON 配置和环境变量插值
1515
- **测试框架**: Vitest
1616
- **代码质量**: Biome(Lint + Format)
17-
- **包管理**: pnpm workspace
17+
- **包管理**: Bun workspaces
1818
- **当前版本**: 0.2.0
1919

2020
## 核心特性
@@ -32,9 +32,9 @@ always respond in Chinese
3232

3333
### 开发命令
3434
```bash
35-
pnpm dev # 启动 CLI 开发模式(watch)
36-
pnpm dev:serve # 启动 CLI 开发模式 + Web 服务器
37-
pnpm build # 构建 CLI
35+
bun run dev # 启动 CLI 开发模式(watch)
36+
bun run dev:web # 启动 CLI 开发模式 + Web 服务器
37+
bun run build # 构建 CLI
3838
```
3939

4040
### 运行命令
@@ -47,18 +47,18 @@ blade serve --port 3000 --hostname 0.0.0.0 # 指定端口和主机
4747

4848
### 测试命令
4949
```bash
50-
pnpm test # 运行测试
51-
pnpm test:all # 运行所有测试
52-
pnpm test:unit # 运行单元测试
53-
pnpm test:cli # 运行 CLI 测试
54-
pnpm test:coverage # 带覆盖率测试
50+
bun run test # 运行测试
51+
bun run test:all # 运行所有测试
52+
bun run test:unit # 运行单元测试
53+
bun run test:cli # 运行 CLI 测试
54+
bun run test:coverage # 带覆盖率测试
5555
```
5656

5757
### 代码质量
5858
```bash
59-
pnpm lint # Lint 检查
60-
pnpm lint:fix # Lint 并自动修复
61-
pnpm type-check # 类型检查
59+
bun run lint # Lint 检查
60+
bun run lint:fix # Lint 并自动修复
61+
bun run type-check # 类型检查
6262
```
6363

6464
## 架构概览

CLAUDE.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ Blade Code is a modern AI-powered coding assistant with CLI + Web UI, built with
1212

1313
```bash
1414
# Development
15-
pnpm dev # Start CLI dev mode (watch)
16-
pnpm dev:serve # Start CLI + Web server
17-
pnpm build # Build CLI
15+
bun run dev # Start CLI dev mode (watch)
16+
bun run dev:web # Start CLI + Web server
17+
bun run build # Build CLI
1818

1919
# Running
2020
blade # Start interactive CLI
2121
blade web # Start Web UI (opens browser)
2222
blade serve # Start headless server
2323

2424
# Testing & Quality
25-
pnpm test:all # Run all tests
26-
pnpm lint # Run linter
27-
pnpm type-check # TypeScript type checking
25+
bun run test:all # Run all tests
26+
bun run lint # Run linter
27+
bun run type-check # TypeScript type checking
2828
```
2929

3030
## Architecture
@@ -75,12 +75,18 @@ Blade/
7575

7676
- Test framework: Vitest
7777
- Tests location: `packages/cli/tests/`
78-
- Run tests: `pnpm test:all`
78+
- Run tests: `bun run test:all`
7979

8080
## Documentation
8181

8282
- User docs: `docs/`
8383

84+
## gstack
85+
86+
Use the /browse skill from gstack for all web browsing, never use mcp__claude-in-chrome__* tools.
87+
88+
Available skills: /office-hours, /plan-ceo-review, /plan-eng-review, /plan-design-review, /design-consultation, /design-shotgun, /design-html, /review, /ship, /land-and-deploy, /canary, /benchmark, /browse, /connect-chrome, /qa, /qa-only, /design-review, /setup-browser-cookies, /setup-deploy, /retro, /investigate, /document-release, /codex, /cso, /autoplan, /plan-devex-review, /devex-review, /careful, /freeze, /guard, /unfreeze, /gstack-upgrade, /learn.
89+
8490
## More Information
8591

8692
- [README.md](README.md) - Project overview

0 commit comments

Comments
 (0)