Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a3fbcb3
refactor: 创建 @anthropic-ai/model-provider 包骨架与类型定义
claude-code-best Apr 13, 2026
670cad6
refactor: 提升 OpenAI 转换器和模型映射到 model-provider 包
claude-code-best Apr 13, 2026
a99375b
refactor: 搬入 Gemini 兼容层到 model-provider 包
claude-code-best Apr 13, 2026
ac0ca4a
refactor: 搬入 errorUtils 并迁移消费者导入到 model-provider
claude-code-best Apr 13, 2026
e458d63
feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)
claude-code-best Apr 14, 2026
befcd2b
docs: 添加 agent-loop 绘图
claude-code-best Apr 14, 2026
67a77ba
Revert "feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)"
claude-code-best Apr 14, 2026
3c9112f
docs: 添加简化版 agent loop
claude-code-best Apr 14, 2026
46593d9
fix: 修复 n 快捷键导致关闭的问题
claude-code-best Apr 14, 2026
a36ab55
fix: 修复 node 下 ws 没打包问题
claude-code-best Apr 14, 2026
e601557
docs: 修复链接
claude-code-best Apr 14, 2026
3c4fa38
test: 添加测试支持
claude-code-best Apr 14, 2026
aa0f868
fix: 修复类型问题(#267) (#271)
claude-code-best Apr 15, 2026
920a7ff
test: 修复类型校验 (#279)
claude-code-best Apr 16, 2026
962ed75
fix(remote-control): harden self-hosted session flows (#278)
solthx Apr 16, 2026
6fb3639
docs: update contributors
claude-code-best Apr 16, 2026
40b5e44
build: 新增 vite 构建流程
claude-code-best Apr 16, 2026
49869ff
feat: 添加环境变量支持以覆盖 max_tokens 设置
claude-code-best Apr 16, 2026
1171f48
feat(langfuse): LLM generation 记录工具定义
claude-code-best Apr 16, 2026
9c1db0e
feat: 添加对 ACP 协议的支持 (#284)
claude-code-best Apr 16, 2026
54e33b3
chore: 1.4.0
claude-code-best Apr 16, 2026
b30a28f
conflict: 解决冲突
claude-code-best Apr 16, 2026
f937828
Merge branch 'refactor/provider'
claude-code-best Apr 16, 2026
05f9260
Merge branch 'main' into refactor/provider
claude-code-best Apr 16, 2026
8cb6c9c
feat: 添加测试覆盖率上报
claude-code-best Apr 16, 2026
ed62439
style: 改名加移动文件夹位置
claude-code-best Apr 16, 2026
1917d52
refactor: 移动测试用例及实现
claude-code-best Apr 16, 2026
2da83c4
test: 修复测试用例完成
claude-code-best Apr 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ jobs:
run: bun test

- name: Build
run: bun run build
run: bun run build:vite
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ bun run health
# Check unused exports
bun run check:unused

bun run typecheck

# Remote Control Server
bun run rcs

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
| 特性 | 说明 | 文档 |
|------|------|------|
| **Claude 群控技术** | Pipe IPC 多实例协作:同机 main/sub 自动编排 + LAN 跨机器零配置发现与通讯,`/pipes` 选择面板 + `Shift+↓` 交互 + 消息广播路由 | [Pipe IPC](https://ccb.agent-aura.top/docs/features/pipes-and-lan) / [LAN](https://ccb.agent-aura.top/docs/features/lan-pipes) |
| ACP 协议一等一支持 | 支持接入 Zed、Cursor 等 IDE,支持会话恢复、Skills、权限桥接 | [文档](https://ccb.agent-aura.top/docs/features/acp-zed) |
| Remote Control 私有部署 | Docker 自托管 RCS + Web UI | [文档](https://ccb.agent-aura.top/docs/features/remote-control-self-hosting) |
| /dream 记忆整理 | 自动整理和优化记忆文件 | [文档](https://ccb.agent-aura.top/docs/features/auto-dream) |
| Web Search | 内置网页搜索工具 | [文档](https://ccb.agent-aura.top/docs/features/web-browser-tool) |
| 自定义模型供应商 | OpenAI/Anthropic/Gemini/Grok 兼容 | [文档](https://ccb.agent-aura.top/docs/features/custom-platform-login) |
| Voice Mode | Push-to-Talk 语音输入 | [文档](https://ccb.agent-aura.top/docs/features/voice-mode) |
| Computer Use | 屏幕截图、键鼠控制 | [文档](https://ccb.agent-aura.top/docs/features/computer-use) |
| Chrome Use | 浏览器自动化、表单填写、数据抓取 | [魔改版](docs/features/chrome-use-mcp) [原生版](https://ccb.agent-aura.top/docs/features/claude-in-chrome-mcp) |
| Chrome Use | 浏览器自动化、表单填写、数据抓取 | [自托管](https://ccb.agent-aura.top/docs/features/chrome-use-mcp) [原生版](https://ccb.agent-aura.top/docs/features/claude-in-chrome-mcp) |
| Sentry | 企业级错误追踪 | [文档](https://ccb.agent-aura.top/docs/internals/sentry-setup) |
| GrowthBook | 企业级特性开关 | [文档](https://ccb.agent-aura.top/docs/internals/growthbook-adapter) |
| Langfuse 监控 | LLM 调用/工具执行/多 Agent 全链路追踪 | [文档](https://ccb.agent-aura.top/docs/features/langfuse-monitoring) |
Expand Down
64 changes: 23 additions & 41 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const DEFAULT_BUILD_FEATURES = [
'ULTRAPLAN',
// P2: daemon + remote control server
'DAEMON',
// ACP (Agent Client Protocol) agent mode
'ACP',
// PR-package restored features
'WORKFLOW_SCRIPTS',
'HISTORY_SNIP',
Expand Down Expand Up @@ -88,8 +90,27 @@ for (const file of files) {
}
}

// Also patch unguarded globalThis.Bun destructuring from third-party deps
// (e.g. @anthropic-ai/sandbox-runtime) so Node.js doesn't crash at import time.
let bunPatched = 0
const BUN_DESTRUCTURE = /var \{([^}]+)\} = globalThis\.Bun;?/g
const BUN_DESTRUCTURE_SAFE = 'var {$1} = typeof globalThis.Bun !== "undefined" ? globalThis.Bun : {};'
for (const file of files) {
if (!file.endsWith('.js')) continue
const filePath = join(outdir, file)
const content = await readFile(filePath, 'utf-8')
if (BUN_DESTRUCTURE.test(content)) {
await writeFile(
filePath,
content.replace(BUN_DESTRUCTURE, BUN_DESTRUCTURE_SAFE),
)
bunPatched++
}
}
BUN_DESTRUCTURE.lastIndex = 0

console.log(
`Bundled ${result.outputs.length} files to ${outdir}/ (patched ${patched} for Node.js compat)`,
`Bundled ${result.outputs.length} files to ${outdir}/ (patched ${patched} for import.meta.require, ${bunPatched} for Bun destructure)`,
)

// Step 4: Copy native .node addon files (audio-capture)
Expand Down Expand Up @@ -119,46 +140,7 @@ const cliNode = join(outdir, 'cli-node.js')

await writeFile(cliBun, '#!/usr/bin/env bun\nimport "./cli.js"\n')

// Node.js entry needs a Bun API polyfill because Bun.build({ target: 'bun' })
// emits globalThis.Bun references (e.g. Bun.$ shell tag in computer-use-input,
// Bun.which in chunk-ys6smqg9) that crash at import time under plain Node.js.
const NODE_BUN_POLYFILL = `#!/usr/bin/env node
// Bun API polyfill for Node.js runtime
if (typeof globalThis.Bun === "undefined") {
const { execFileSync } = await import("child_process");
const { resolve, delimiter } = await import("path");
const { accessSync, constants: { X_OK } } = await import("fs");
function which(bin) {
const isWin = process.platform === "win32";
const pathExt = isWin ? (process.env.PATHEXT || ".EXE").split(";") : [""];
for (const dir of (process.env.PATH || "").split(delimiter)) {
for (const ext of pathExt) {
const candidate = resolve(dir, bin + ext);
try { accessSync(candidate, X_OK); return candidate; } catch {}
}
}
return null;
}
// Bun.$ is the shell template tag (e.g. $\`osascript ...\`). Only used by
// computer-use-input/darwin — stub it so the top-level destructuring
// \`var { $ } = globalThis.Bun\` doesn't crash.
function $(parts, ...args) {
throw new Error("Bun.$ shell API is not available in Node.js. Use Bun runtime for this feature.");
}
function hash(data, seed) {
let h = ((seed || 0) ^ 0x811c9dc5) >>> 0;
for (let i = 0; i < data.length; i++) {
h ^= data.charCodeAt(i);
h = Math.imul(h, 0x01000193) >>> 0;
}
return h;
}
globalThis.Bun = { which, $, hash };
}
import "./cli.js"
`
await writeFile(cliNode, NODE_BUN_POLYFILL)
// NOTE: when new Bun-specific globals appear in bundled output, add them here.
await writeFile(cliNode, '#!/usr/bin/env node\nimport "./cli.js"\n')

// Make both executable
const { chmodSync } = await import('fs')
Expand Down
Loading
Loading