Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .github/signpath/windows-application.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
<pe-file path="claude-sidecar-*.exe">
<authenticode-sign/>
</pe-file>
<pe-file path="agent-desktop.exe">
<authenticode-sign/>
</pe-file>
</zip-file>
</artifact-configuration>
10 changes: 10 additions & 0 deletions .github/workflows/build-desktop-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,16 @@ jobs:
SIDECAR_TARGET_TRIPLE: ${{ matrix.target_triple }}
run: bun run prepare:cloudflared

- name: Setup native Computer Use Rust toolchain
if: matrix.smoke_platform != 'macos'
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target_triple }}

- name: Prepare native Computer Use dependencies
if: matrix.smoke_platform != 'macos'
run: cargo +stable fetch --locked --manifest-path native/agent-desktop/Cargo.toml --target ${{ matrix.target_triple }}

- name: Build sidecars
working-directory: desktop
env:
Expand Down
55 changes: 55 additions & 0 deletions .github/workflows/native-computer-use.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Native Computer Use

on:
pull_request:
paths:
- 'native/agent-desktop/**'
- 'src/utils/computerUse/agentDesktop*'
- 'src/vendor/computer-use-mcp/agentDesktop*'
- 'desktop/scripts/native-agent-desktop*'
- 'scripts/pr/run-agent-desktop-checks*'
- '.github/workflows/native-computer-use.yml'
push:
branches: [main]
paths:
- 'native/agent-desktop/**'
- 'src/utils/computerUse/agentDesktop*'
- 'src/vendor/computer-use-mcp/agentDesktop*'
- 'desktop/scripts/native-agent-desktop*'
- 'scripts/pr/run-agent-desktop-checks*'
- '.github/workflows/native-computer-use.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
native:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
adapter: agent-desktop-linux
target: x86_64-unknown-linux-gnu
- os: windows-latest
adapter: agent-desktop-windows
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: oven-sh/setup-bun@v2
with:
bun-version-file: package.json
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Prepare locked Rust dependencies
run: cargo +stable fetch --locked --manifest-path native/agent-desktop/Cargo.toml --target ${{ matrix.target }}
- name: Compile the platform adapter, CLI and test targets offline
run: cargo +stable check --locked --offline --manifest-path native/agent-desktop/Cargo.toml -p agent-desktop -p ${{ matrix.adapter }} --all-targets --target ${{ matrix.target }}
- name: Run deterministic core, cursor and CLI tests in an isolated home
run: bun run check:agent-desktop
6 changes: 6 additions & 0 deletions .github/workflows/nightly-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ jobs:
run: bun run check:desktop
- name: Mobile typecheck, lint, and tests
run: bun run check:mobile
- name: Setup native Computer Use Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Prepare native Computer Use dependencies
run: cargo +stable fetch --locked --manifest-path native/agent-desktop/Cargo.toml
- name: Native Computer Use deterministic checks
run: bun run check:agent-desktop
- name: Electron host checks
run: bun run check:electron
- name: Persistence upgrade contracts
Expand Down
24 changes: 15 additions & 9 deletions .github/workflows/pr-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,37 +53,39 @@ jobs:

- name: Collect changed files
env:
GH_TOKEN: ${{ github.token }}
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPOSITORY: ${{ github.repository }}
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
PUSH_BEFORE: ${{ github.event.before }}
PUSH_AFTER: ${{ github.sha }}
BASE_REF: ${{ github.base_ref }}
run: |
: > changed-files.nul
: > author.txt
: > codeowners.txt
if [ "$EVENT_NAME" = "pull_request" ]; then
gh api "repos/${REPOSITORY}/pulls/${PR_NUMBER}/files" --paginate --jq '.[].filename' > changed-files.txt
# The PR files API stops at 3000 paths. Checkout includes both commits.
git cat-file -e "${PR_BASE_SHA}^{commit}"
git cat-file -e "${PR_HEAD_SHA}^{commit}"
git diff --name-only -z "${PR_BASE_SHA}...${PR_HEAD_SHA}" > changed-files.nul
jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH" > labels.txt
# A CODEOWNER's own PR needs no maintainer-approval label. Owners come
# from the base branch, so a PR cannot add its author to the list.
jq -r '.pull_request.user.login' "$GITHUB_EVENT_PATH" > author.txt
git show "origin/${BASE_REF}:.github/CODEOWNERS" > codeowners.txt 2>/dev/null || : > codeowners.txt
git show "${PR_BASE_SHA}:.github/CODEOWNERS" > codeowners.txt 2>/dev/null || : > codeowners.txt
else
# A push to main: scope the run to what the push brought in. A new branch
# or a force push has no usable "before", so fall back to the last commit.
if git cat-file -e "${PUSH_BEFORE}^{commit}" 2>/dev/null; then
git diff --name-only "$PUSH_BEFORE" "$PUSH_AFTER" > changed-files.txt
git diff --name-only -z "$PUSH_BEFORE" "$PUSH_AFTER" > changed-files.nul
else
git diff --name-only "${PUSH_AFTER}~1" "$PUSH_AFTER" > changed-files.txt
git diff --name-only -z "${PUSH_AFTER}~1" "$PUSH_AFTER" > changed-files.nul
fi
: > labels.txt
fi

- name: Build deterministic scope plan
id: policy
run: bun run scripts/pr/change-policy.ts --files changed-files.txt --labels-file labels.txt --author-file author.txt --codeowners-file codeowners.txt --plan-only
run: bun run scripts/pr/change-policy.ts --files0 changed-files.nul --labels-file labels.txt --author-file author.txt --codeowners-file codeowners.txt --plan-only

policy-enforcement:
name: policy-enforcement
Expand Down Expand Up @@ -355,6 +357,10 @@ jobs:
- name: Prepare bundled Cloudflare connector build dependency
working-directory: desktop
run: bun run prepare:cloudflared
- name: Setup native Computer Use Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Prepare native Computer Use dependencies
run: cargo +stable fetch --locked --manifest-path native/agent-desktop/Cargo.toml
- name: Run desktop native checks
run: bun run check:native

Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,16 @@ jobs:
SIDECAR_TARGET_TRIPLE: ${{ matrix.target_triple }}
run: bun run prepare:cloudflared

- name: Setup native Computer Use Rust toolchain
if: matrix.smoke_platform != 'macos'
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target_triple }}

- name: Prepare native Computer Use dependencies
if: matrix.smoke_platform != 'macos'
run: cargo +stable fetch --locked --manifest-path native/agent-desktop/Cargo.toml --target ${{ matrix.target_triple }}

- name: Build sidecars
working-directory: desktop
env:
Expand Down Expand Up @@ -568,9 +578,11 @@ jobs:
$sidecarName = "claude-sidecar-${{ matrix.target_triple }}.exe"
$mainExecutable = Join-Path $unpackedDir "Claude Code Haha.exe"
$sidecarExecutable = Join-Path $unpackedDir "resources/app.asar.unpacked/src-tauri/binaries/$sidecarName"
$agentDesktopExecutable = Join-Path $unpackedDir "resources/app.asar.unpacked/src-tauri/binaries/agent-desktop.exe"
New-Item -ItemType Directory -Path $stageDir | Out-Null
Copy-Item -LiteralPath $mainExecutable -Destination (Join-Path $stageDir "Claude Code Haha.exe")
Copy-Item -LiteralPath $sidecarExecutable -Destination (Join-Path $stageDir $sidecarName)
Copy-Item -LiteralPath $agentDesktopExecutable -Destination (Join-Path $stageDir "agent-desktop.exe")
"stage_dir=$stageDir" >> $env:GITHUB_OUTPUT
"unpacked_dir=$unpackedDir" >> $env:GITHUB_OUTPUT
"sidecar_name=$sidecarName" >> $env:GITHUB_OUTPUT
Expand Down Expand Up @@ -609,8 +621,10 @@ jobs:
$sidecarName = "${{ steps.stage-signpath-application.outputs.sidecar_name }}"
$mainExecutable = Join-Path $unpackedDir "Claude Code Haha.exe"
$sidecarExecutable = Join-Path $unpackedDir "resources/app.asar.unpacked/src-tauri/binaries/$sidecarName"
$agentDesktopExecutable = Join-Path $unpackedDir "resources/app.asar.unpacked/src-tauri/binaries/agent-desktop.exe"
Copy-Item -LiteralPath (Join-Path $signedDir "Claude Code Haha.exe") -Destination $mainExecutable -Force
Copy-Item -LiteralPath (Join-Path $signedDir $sidecarName) -Destination $sidecarExecutable -Force
Copy-Item -LiteralPath (Join-Path $signedDir "agent-desktop.exe") -Destination $agentDesktopExecutable -Force

function Assert-SignPathSignature([string] $Path) {
$signature = Get-AuthenticodeSignature -LiteralPath $Path
Expand All @@ -628,6 +642,7 @@ jobs:

Assert-SignPathSignature $mainExecutable
Assert-SignPathSignature $sidecarExecutable
Assert-SignPathSignature $agentDesktopExecutable

- name: Package NSIS installer from signed Windows application
if: matrix.smoke_platform == 'windows' && needs.signing-preflight.outputs.windows_signed == 'true'
Expand Down
11 changes: 7 additions & 4 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

</div>

cc-haha is a **desktop Claude Code workspace** for macOS, Windows, and Linux: multi-session workspaces, global search, branch / Worktree launch, diff review, built-in browser preview, GUI permission approval, any model — Claude, ChatGPT, Grok, presets, or local endpoints — image generation, visual MCP & SubAgent managers, an Agent Teams workbench, dynamic Workflow orchestration, model trace, Computer Use, skill marketplace, colour themes, desktop pets, mobile app and H5 remote access, IM integration, and scheduled tasks, all in one app. **On macOS, Computer Use can operate other apps without taking over your physical mouse or keyboard.** The companion Android / iPhone app pairs with your computer by QR code, so you can approve actions and start tasks away from your desk.
cc-haha is a **desktop Claude Code workspace** for macOS, Windows, and Linux: multi-session workspaces, global search, branch / Worktree launch, diff review, built-in browser preview, GUI permission approval, any model — Claude, ChatGPT, Grok, presets, or local endpoints — image generation, visual MCP & SubAgent managers, an Agent Teams workbench, dynamic Workflow orchestration, model trace, Computer Use, skill marketplace, colour themes, desktop pets, mobile app and H5 remote access, IM integration, and scheduled tasks, all in one app. **Computer Use keeps the existing native macOS engine and reuses agent-desktop on Windows / Linux. Supported background semantic actions leave the physical pointer alone; physical input still uses the foreground.** The companion Android / iPhone app pairs with your computer by QR code, so you can approve actions and start tasks away from your desk.

<p align="center"><b>Platinum Sponsor · Modelflare</b></p>

Expand Down Expand Up @@ -60,8 +60,8 @@ cc-haha is a **desktop Claude Code workspace** for macOS, Windows, and Linux: mu
<br><sub><a href="docs/en/internals/agent.md">Agent Teams</a></sub>
</td>
<td width="33%" align="center" valign="top">
<img src="docs/images/readme/computer-use-en.webp" width="100%" alt="Computer Use: the agent drives other apps with its own virtual cursor while your mouse and keyboard stay yours">
<br><sub><a href="docs/en/desktop/computer-use.md">Computer Use</a></sub>
<img src="docs/images/readme/computer-use-en.webp" width="100%" alt="Computer Use macOS example: an agent cursor drives another app while the physical pointer remains usable">
<br><sub><a href="docs/en/desktop/computer-use.md">Computer Use (macOS example)</a></sub>
</td>
</tr>
<tr>
Expand Down Expand Up @@ -203,7 +203,7 @@ If this project helps you, consider buying me a coffee — every bit of support
- **Agent Teams workbench**: visualize multi-agent collaboration in the GUI — members, tasks, a communication feed, and a dependency-lane canvas.
- **Dynamic Workflow orchestration**: the model writes and runs orchestration scripts on the fly, driving subagents concurrently or in pipelines, with phase views, interrupts, and resume.
- **Model trace**: every model request is logged locally with status and timing — search and filter to diagnose stuck or failed calls.
- **Computer Use**: let the agent take screenshots, click, type, and control desktop apps after authorization; the native macOS runtime does not take over your physical mouse or keyboard.
- **Computer Use**: native desktop control on macOS / Windows / Linux, with no Python setup and one confirmation for all supported apps. Windows / Linux reuse agent-desktop and prefer background semantic actions; physical input remains subject to OS and foreground limits.
- **Desktop pets**: Dada, Huhu, Bubu, and Huihui change what they do with the task at hand — or raise one of your own (off by default).
- **Mobile app and H5**: pair the Android / iPhone app with your computer by QR code to approve tool calls, answer questions, start new tasks, review changes, and stop work from your phone, or connect from the phone browser. Tasks always run on the computer, so locking the phone won't interrupt them.
- **IM integration**: chat, switch projects, and approve actions through Telegram / Feishu / WeChat / DingTalk / WhatsApp / WeCom / QQ / Slack.
Expand Down Expand Up @@ -244,6 +244,7 @@ Thanks to the following open-source projects and community practices for referen

- [React](https://github.com/facebook/react): frontend engineering and component-based UI ecosystem.
- [Electron](https://github.com/electron/electron): cross-platform desktop app capabilities and engineering practices.
- [agent-desktop](https://github.com/vercel-labs/agent-desktop) by Vercel Labs: a reference and directly reused native implementation for Windows / Linux Computer Use. Pinned to **1.0.2**, commit [`9eb9b296192fcb70bda25e918cd6dd66abfa3d0d`](https://github.com/vercel-labs/agent-desktop/tree/9eb9b296192fcb70bda25e918cd6dd66abfa3d0d), with the [Apache-2.0 license](native/agent-desktop/LICENSE), [provenance and file hashes](native/agent-desktop/UPSTREAM.json), and [local changes](native/agent-desktop/PATCHES.md) retained.
- [cc-switch](https://github.com/farion1231/cc-switch): reference for model provider configuration.
- [LINUX DO](https://linux.do/): a new ideal developer community.
- [AtomGit](https://atomgit.com/NanmiCoder/cc-haha): code hosting for this project in China.
Expand All @@ -263,3 +264,5 @@ If this project helps you, please support it with a ⭐ Star so more people can
## License

Current terms are the [cc-haha Community Source License 1.0](LICENSE). Noncommercial personal use and internal business operations are allowed; paid client work, commercial deliverables, paid customization or secondary development, commercial distribution, and paid services require prior written commercial permission; redistributions require visible source attribution. Existing MIT grants and third-party licenses remain valid. See the [licensing guide](LICENSING.md). This is source-available, not an OSI-approved open-source license.

Original reused agent-desktop code remains under Apache-2.0; the project's Community Source License does not add restrictions to those existing grants. Third-party dependencies retain their own licenses; see [Third-Party Licenses](THIRD_PARTY_LICENSES.md).
Loading
Loading