claude-code-best
227083d31f
fix: 修复截图 MIME 类型硬编码导致 API 拒绝的问题
...
macOS screencapture 输出 PNG,但代码硬编码 mimeType 为 image/jpeg,
导致 API 报错 "specified using image/jpeg but appears to be image/png"。
改为通过 magic bytes 检测实际图片格式。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-12 17:32:28 +08:00
claude-code-best
09fc515edb
feat: 远程群控 ( #243 )
...
* feat: restore pipe IPC, LAN pipes, monitor tool, and PR-package features
Core IPC system (UDS_INBOX):
- PipeServer/PipeClient with UDS + TCP dual transport, NDJSON protocol
- PipeRegistry: machineId-based role assignment, file locking
- Master/slave attach, prompt relay, permission forwarding
- Heartbeat lifecycle with parallel isPipeAlive probes
- Commands: /pipes, /attach, /detach, /send, /claim-main, /pipe-status
LAN Pipes (LAN_PIPES):
- UDP multicast beacon (224.0.71.67:7101) for zero-config LAN discovery
- PipeServer TCP listener, PipeClient TCP connect mode
- Heartbeat auto-attaches LAN peers via TCP
- Cross-machine attach allowed regardless of role
- /pipes shows [LAN] peers with role + hostname/IP
- SendMessageTool supports tcp: scheme with user consent
Architecture — extracted hooks from REPL.tsx (~830 lines → ~20 lines):
- usePipeIpc: lifecycle (bootstrap, handlers, heartbeat, cleanup)
- usePipeRelay: slave→master message relay via module singleton
- usePipePermissionForward: permission request/cancel forwarding
- usePipeRouter: selected pipe input routing with role+IP labels
- Shared ndjsonFramer.ts replaces 3 duplicate NDJSON parsers
Key fixes applied during development:
- Multicast binds to correct LAN interface (not WSL/Docker)
- Beacon ref stored as module singleton (not Zustand state mutation)
- Heartbeat preserves LAN peers in discoveredPipes and selectedPipes
- Disconnect handler calls removeSlaveClient (fixes listener leak)
- cleanupStaleEntries probes without lock, writes briefly under lock
- getMachineId uses async execFile (not blocking execSync)
- globalThis.__pipeSendToMaster replaced with setPipeRelay singleton
- M key only toggles route mode when selector panel is expanded
- User prompt displayed in message list on pipe broadcast
- Broadcast notifications show [role] + hostname/IP for LAN peers
Other restored features:
- Monitor tool: /monitor command, MonitorTool, MonitorMcpTask lifecycle
- Daemon supervisor and remoteControlServer command
- Tools: SnipTool, SleepTool, ListPeersTool, SendUserFileTool,
WebBrowserTool, WorkflowTool, and 10+ stub→implementation rewrites
- Feature flags: UDS_INBOX, LAN_PIPES, MONITOR_TOOL, FORK_SUBAGENT,
KAIROS, COORDINATOR_MODE, WORKFLOW_SCRIPTS, HISTORY_SNIP
Tests: 2190 pass / 0 fail (15 new: lanBeacon 7, peerAddress 8)
* fix: resolve merge conflicts and fix all tsc/test errors after main merge
- Export ToolResultBlockParam from Tool.ts (14 tool files fixed)
- Migrate ink imports from ../../ink.js to @anthropic/ink (7 files)
- Fix toolUseID → toolUseId typo in monitor.ts and MonitorTool.tsx
- Add fallback values for string|undefined type errors (8 locations)
- Fix AppState type in assistant.ts, add NewInstallWizard stubs
- Fix ParsedRepository.repo → .name in subscribe-pr.ts
- Fix AgentId/string type mismatch in BackgroundTasksDialog.tsx
- Fix PipeRelayFn return type in pipePermissionRelay.ts
- Use PipeMessage type in usePipeRelay.ts
- Fix lanBeacon.test.ts mock type assertions
- Create missing MouseActionEvent class for ink package
- Use ansi: color format instead of bare "green"/"red"
- Resolve theme.permission access via getTheme()
Result: 0 tsc errors, 2496 tests pass, 0 fail
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: 恢复 /poor 的说明
---------
Co-authored-by: unraid <local@unraid.local >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-11 23:22:55 +08:00
claude-code-best
6a70056910
feat: 全部类型问题解决
2026-04-11 10:24:00 +08:00
claude-code-best
ff03fe7fcb
fix: 修复类型问题
2026-04-10 17:34:01 +08:00
claude-code-best
a14d3dc8f0
fix(types): clean type fixes across 92 files
...
Apply proper TypeScript type corrections without any unsafe casts:
- Fix unknown/never/{} types from decompilation
- Correct function signatures and parameter types
- Add missing type declarations and interfaces
- Fix Ink component prop types
- Update API client/provider type annotations
Test files with mock data casts are included as-is (acceptable pattern).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-09 23:45:56 +08:00
claude-code-best
2b0d31aaca
feat: 对齐构建时的目标
2026-04-09 20:30:53 +08:00
claude-code-best
2da6514095
feat: 支持自托管的 remote-control-server ( #214 )
...
* feat: 支持自托管的 remote-control-server (#214 )
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-09 17:40:50 +08:00
claude-code-best
e86573ac2f
fix: 修复 -r 模式下键盘输入无响应
...
两个根因:
1. earlyInput 的 readableHandler 残留在 stdin 上
setAppCallbacks() 在反编译项目中从未被调用,导致
stopCapturingEarlyInput() 是 no-op,readableHandler
在 Ink 的 handleReadable 之前消费所有 stdin 数据。
修复:在 handleSetRawMode(true) 时移除非自身的 readable listeners。
2. React 19 layout effect cleanup 顺序问题
React 19 先运行新树的 layout effects,再清理旧树。
当旧树(showSetupDialog)比新树(launchResumeChooser)
有更多 useInput hooks 时,旧树 cleanup 把
rawModeEnabledCount 降到 0,错误关闭 raw mode。
修复:当 count=0 但仍有活跃 EventEmitter listeners 时恢复 count。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-07 23:54:09 +08:00
claude-code-best
3e1c6bcc3f
Merge branch 'main' into refactor/ink-v2
2026-04-07 22:41:35 +08:00
claude-code-best
91b9366f64
refactor: 大规模迁移原有组件到 ink 包内
2026-04-07 22:26:45 +08:00
mcjjin
0d8f494c4b
fix(computer-use): 修复权限检查和应用列表获取的问题 ( #157 )
...
* docs: update contributors
* fix(computer-use): 修复权限检查和应用列表获取的问题
修复 macOS 平台下权限检查的 JXA 回退逻辑,确保在没有原生模块时仍能正确检测权限
改进应用列表获取方式,使用 mdls 获取真实的 bundleId 而非生成伪 ID
* docs: update contributors
* docs: update contributors
* docs: update contributors
---------
Co-authored-by: mcjjin <8590489+mcjjin@users.noreply.github.com >
Co-authored-by: claude-code-best <claude-code-best@proton.me >
Co-authored-by: claude-code-best <272536312+claude-code-best@users.noreply.github.com >
2026-04-07 19:53:59 +08:00
claude-code-best
f268b16b31
feat: 将 keybinding 纳入 ink 管辖
2026-04-07 17:51:01 +08:00
claude-code-best
e5782e732c
Revert "Revert "feat: 第一个可以用的 ink 组件抽象 ( #158 )" ( #175 )"
...
This reverts commit 88d4c3ba24 .
2026-04-07 16:17:48 +08:00
claude-code-best
88d4c3ba24
Revert "feat: 第一个可以用的 ink 组件抽象 ( #158 )" ( #175 )
...
This reverts commit c445f43f8d .
2026-04-07 15:05:03 +08:00
claude-code-best
c445f43f8d
feat: 第一个可以用的 ink 组件抽象 ( #158 )
2026-04-06 23:56:45 +08:00
yi7503
522a1a366d
feat: enable Computer Use on Windows and Linux ( #145 )
...
Remove macOS-only guards so Computer Use works cross-platform:
- main.tsx: allow CHICAGO_MCP on any known platform (not just macos)
- swiftLoader.ts: remove darwin-only throw, let the backend handle it
- computer-use-input: dispatch to darwin/win32/linux backends
- computer-use-swift: rename loadDarwin→loadBackend, dispatch all platforms
Co-authored-by: yi7503 <yi7503@gmail.com >
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-06 09:57:55 +08:00
claude-code-best
2b84333913
Merge pull request #137 from amDosion/feat/computer-use-windows
...
feat: Computer Use v2 — 跨平台 Executor + Python Bridge + GUI 无障碍
2026-04-05 21:02:32 +08:00
unraid
c17edcb12e
feat: Computer Use — Windows 跨平台支持 + GUI 无障碍增强 + Python Bridge
...
三平台 Computer Use (macOS + Windows + Linux),Windows 专项增强。
- MCP server: toolCalls/tools/executor/mcpServer 等 12 文件完整实现
- 平台抽象层: platforms/{win32,darwin,linux}.ts
- 跨平台 executor: executorCrossPlatform.ts
- CHICAGO_MCP + VOICE_MODE feature flags 启用
- windowMessage.ts: SendMessageW (WM_CHAR Unicode + 剪贴板粘贴)
- windowBorder.ts: 4 叠加窗口边框 (30fps 跟踪)
- uiAutomation.ts: UI Automation 元素树/点击/写值
- accessibilitySnapshot.ts: 无障碍快照 → 模型感知 GUI
- bridge.py + bridgeClient.ts: Python 长驻进程 (替代 per-call PS)
- window_management: min/max/restore/close/focus (Win32 API)
- click_element / type_into_element: 按名称操作 (无需坐标)
- 截图自动附带 Accessibility Snapshot
- 17 种方法, stdin/stdout JSON 通信
- 窗口枚举 1.5ms vs PS 500ms, 截图 360ms vs PS 800ms
- 依赖: mss + Pillow + pywinauto
2026-04-05 15:47:20 +08:00
sobird
c16fc62877
chore: update
2026-04-05 09:12:48 +08:00
sobird
d3a607e4e5
fix: 修复代码不能在终端高亮的问题
...
highlight.js v11 result = hljs().highlight(); 已经不存在result.emitter,使用result._emitter替代
2026-04-05 01:37:21 +08:00
claude-code-best
ad1f90a00e
feat: 恢复 mac 版本的 Computer Use
2026-04-04 11:36:43 +08:00
claude-code-best
86d2c8f9e8
Merge remote-tracking branch 'amDosion/feat/computer-use-windows'
2026-04-04 00:12:52 +08:00
claude-code-best
131465097f
Merge branch 'pr/amDosion/92'
2026-04-04 00:12:15 +08:00
unraid
3707c3c0ba
feat: Windows Computer Use enhancement — PrintWindow, UI Automation, OCR
...
New Windows-native capabilities:
- windowCapture.ts: PrintWindow API for per-window screenshot (works on
occluded/background windows)
- windowEnum.ts: EnumWindows for precise window enumeration with HWND
- uiAutomation.ts: IUIAutomation for UI tree reading, element clicking,
text input, and coordinate-based element identification
- ocr.ts: Windows.Media.Ocr for screen text recognition (en-US + zh-CN)
Updated win32.ts backend to use EnumWindows for listRunning() and added
captureWindowTarget() for window-specific screenshots.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-04 00:00:02 +08:00
unraid
e3264a1691
feat: enable Computer Use with macOS + Windows + Linux support
...
Phase 1: Replace @ant/computer-use-mcp stub (12 files, 6517 lines).
Phase 2: Remove 8 macOS-only guards in src/:
- main.tsx: remove getPlatform()==='macos' check
- swiftLoader.ts: remove darwin-only throw
- executor.ts: extend platform guard, clipboard dispatch, paste key
- drainRunLoop.ts: skip CFRunLoop pump on non-darwin
- escHotkey.ts: non-darwin returns false (Ctrl+C fallback)
- hostAdapter.ts: non-darwin permissions granted
- common.ts: dynamic platform + screenshotFiltering
- gates.ts: enabled:true, subscription check removed
Phase 3: Add Linux backends (xdotool/scrot/xrandr/wmctrl):
- computer-use-input/backends/linux.ts (173 lines)
- computer-use-swift/backends/linux.ts (278 lines)
Verified on Windows x64: mouse, screenshot, displays, foreground app.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-03 23:17:14 +08:00
unraid
6738a76152
feat: enable Claude in Chrome MCP with full browser control
...
Replace the 6-line stub in @ant/claude-for-chrome-mcp with the complete
implementation (8 files, 3038 lines) from the reference project.
Provides 17 browser tools: navigate, screenshot, click, type, read DOM,
execute JS, record GIF, monitor console/network, manage tabs, etc.
No feature flag needed. No changes to src/ (already matches official).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-03 21:46:07 +08:00
unraid
7ae94327fb
feat: enable /voice mode with native audio binaries
...
Restore voice input by:
- Copying official cpal-based audio-capture.node binaries (6 platforms)
- Replacing SoX subprocess stub with native .node loader
- Adding VOICE_MODE to default build features
All voice source files in src/ already match the official CLI.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com >
2026-04-03 21:14:44 +08:00
claude-code-best
9a57642d3a
feat: 完成最新的可构建版本
2026-04-01 10:42:53 +08:00
claude-code-best
722d59b6d5
feat: 实现 @ant/computer-use-swift — macOS JXA/screencapture
...
用 JXA + screencapture 替代原始 Swift 原生模块:
- display.getSize/listAll: CGGetActiveDisplayList/NSScreen 获取显示器信息
- apps.listRunning: System Events 获取前台应用列表
- apps.listInstalled: 扫描 /Applications 目录
- apps.open/unhide: AppleScript 应用控制
- apps.appUnderPoint: NSWorkspace frontmostApplication
- screenshot.captureExcluding/captureRegion: screencapture 命令
- resolvePrepareCapture: 截图 + base64 编码
实测:display 返回 {width:1710, height:1112},running apps 正确识别。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 08:48:04 +08:00
claude-code-best
b51b2d7675
feat: 升级 @ant/computer-use-mcp — 类型安全 stub + sentinel apps
...
- types.ts: 替换所有 any 为真实类型 (CoordinateMode, CuSubGates,
Logger, GrantFlags, CuPermissionRequest/Response, ComputerUseHostAdapter)
- index.ts: 所有导出类型化 (DisplayGeometry, FrontmostApp, InstalledApp,
RunningApp, ScreenshotResult, CuCallToolResult 等);
targetImageSize() 实现真实缩放逻辑;
bindSessionContext() 返回类型正确的空调度器
- sentinelApps.ts: 添加 10 个 macOS 敏感应用 (Terminal, iTerm2,
Finder, System Preferences 等) 及其分类
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 08:36:12 +08:00
claude-code-best
975b4876cc
feat: 实现 @ant/computer-use-input — macOS 键鼠模拟
...
使用 AppleScript + JXA (JavaScript for Automation) 实现完整 API:
- moveMouse: CGEvent 鼠标移动
- key/keys: System Events 键盘输入(支持修饰键组合)
- mouseLocation: CGEvent 查询当前鼠标位置
- mouseButton: CGEvent 鼠标点击/按下/释放
- mouseScroll: CGEvent 滚轮事件
- typeText: System Events 文本输入
- getFrontmostAppInfo: 获取前台应用 bundleId + 名称
兼容 require() 调用方式(所有方法作为命名导出)。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 08:27:08 +08:00
claude-code-best
e443a8fa51
feat: 搭建单元测试基础设施 — Bun test runner + 示例测试
...
添加 bunfig.toml 配置、test script,以及三组示例测试:
- src/utils/array.ts (intersperse, count, uniq)
- src/utils/set.ts (difference, intersects, every, union)
- packages/color-diff-napi (ansi256FromRgb, colorToEscape, detectLanguage 等)
41 tests, 0 failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 02:08:38 +08:00
claude-code-best
7e15974be9
feat: 实现 4 个 NAPI 包 — modifiers/image-processor/audio-capture/url-handler
...
- modifiers-napi: 使用 Bun FFI 调用 macOS CGEventSourceFlagsState 检测修饰键
- image-processor-napi: 集成 sharp 库,macOS 剪贴板图像读取 (osascript)
- audio-capture-napi: 基于 SoX/arecord 的跨平台音频录制
- url-handler-napi: 完善函数签名(保持 null fallback)
- 修复 image-processor 类型兼容性问题
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-01 01:07:42 +08:00
claude-code-best
dd9cd782a7
feat: 问就是封包
2026-03-31 23:32:58 +08:00
claude-code-best
d7a729ca68
feat: 完成第二版类型清理
2026-03-31 23:03:47 +08:00
claude-code-best
c4d92178b7
feat: 完成大部分操作
2026-03-31 21:40:37 +08:00
claude-code-best
3d4cb096d1
feat: monorepo 构建完成
2026-03-31 21:21:46 +08:00