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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions desktop/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cat Cafe Desktop
# Clowder AI Desktop

基于 Electron 的桌面应用壳层,为 Cat Cafe 提供一键启动、系统托盘和独立窗口体验。
基于 Electron 的桌面应用壳层,为 Clowder AI 提供一键启动、系统托盘和独立窗口体验。
当前支持 **Windows 安装器** 和 **macOS DMG 安装器**。

## 设计哲学
Expand Down Expand Up @@ -141,16 +141,16 @@ pnpm desktop:pack
| 3/6 | 下载 Node.js 便携版(匹配构建机 ABI 版本) | `bundled/node-darwin-{arm64,x64}/` |
| 4/6 | 从源码编译 Redis(~30s/架构) | `bundled/redis-darwin-{arm64,x64}/` |
| 5/6 | 跳过(macOS DMG 无 post-install 阶段,不捆绑 CLI 工具;用户自行安装) | — |
| 6/6 | 生成 icon.icns + electron-builder 构建 DMG | `dist/CatCafe-{version}-{arch}.dmg` |
| 6/6 | 生成 icon.icns + electron-builder 构建 DMG | `dist/ClowderAI-{version}-{arch}.dmg` |

#### 已知注意事项

- **node_modules 补拷**:electron-builder 从 v20.15.2 起不再将 `node_modules` 目录包含在 `extraResources` 中([electron-builder#3104](https://github.com/electron-userland/electron-builder/issues/3104))。项目通过 `desktop/afterPack.js` hook 在打包后手动拷贝 `node_modules` 解决此问题。
- **未签名应用**:代码签名已禁用(`identity=null`)。首次启动需右键 → 打开,或执行:
```bash
xattr -cr "/Applications/Cat Cafe.app"
xattr -cr "/Applications/Clowder AI.app"
```
- **支持的安装位置(macOS)**:packaged 版本仅支持从 `/Applications/Cat Cafe.app` 启动。
- **支持的安装位置(macOS)**:packaged 版本仅支持从 `/Applications/Clowder AI.app` 启动。
- 启动时 `desktop/main.js` 的 `ensureValidMacInstallLocation()` guard 会拒绝从 DMG 卷
(`/Volumes/...`)直接运行,并弹出"必须先安装"对话框。
- **范围外**:`~/Applications`(用户级 Applications)、外部卷(USB / 网络盘)、企业
Expand All @@ -163,8 +163,8 @@ pnpm desktop:pack
#### 产物位置

```
dist/CatCafe-{version}-arm64.dmg # Apple Silicon
dist/CatCafe-{version}-x64.dmg # Intel Mac
dist/ClowderAI-{version}-arm64.dmg # Apple Silicon
dist/ClowderAI-{version}-x64.dmg # Intel Mac
```

---
Expand All @@ -187,7 +187,7 @@ pnpm desktop:installer
3. 下载 Node.js 便携版(ABI 版本与构建机一致,确保 native 模块兼容)
4. 下载/复制 Windows 便携版 Redis
5. 构建 Electron 壳(`electron-builder --win --dir`)
6. 编译 Inno Setup 安装包(`dist/CatCafe-Setup-x.x.x.exe`)
6. 编译 Inno Setup 安装包(`dist/ClowderAI-Setup-x.x.x.exe`)

安装包在目标机器上执行:
- 复制运行时包 + 构建产物 + Electron 壳 + 便携 Node.js + 便携 Redis
Expand All @@ -213,9 +213,9 @@ pnpm desktop:installer

### 步骤

1. **运行安装包** — 双击 `CatCafe-Setup-x.x.x.exe`,选择 `Full`(全部 CLI 工具)或 `Minimal`(仅核心)
1. **运行安装包** — 双击 `ClowderAI-Setup-x.x.x.exe`,选择 `Full`(全部 CLI 工具)或 `Minimal`(仅核心)
2. **等待安装完成** — 安装器自动完成:解包应用 + 便携 Node.js + 便携 Redis → 生成 `.env` → 挂载 skills → 安装所选 CLI 工具
3. **启动 Cat Cafe** — 安装结束后勾选"Launch Cat Cafe",或从桌面快捷方式启动
3. **启动 Clowder AI** — 安装结束后勾选"Launch Clowder AI",或从桌面快捷方式启动
4. **配置 Provider** — 打开 Hub → 账号配置,为你要使用的 AI 服务完成认证:
- **Claude** — 运行 `claude` 命令完成 Anthropic 登录
- **Codex** — 运行 `codex` 命令完成 OpenAI 登录
Expand All @@ -236,8 +236,8 @@ pnpm desktop:installer

桌面应用的运行日志集中在用户数据目录:

- **Windows**:`%LOCALAPPDATA%\Cat Cafe\data\logs\` (`main.log` / `desktop.log` / `api\api.log`)
- **macOS**:`~/Library/Application Support/Cat Cafe/data/logs/` (`main.log` / `desktop.log` / `api/api.log`)
- **Windows**:`%LOCALAPPDATA%\Clowder AI\data\logs\` (`main.log` / `desktop.log` / `api\api.log`)
- **macOS**:`~/Library/Application Support/Clowder AI/data/logs/` (`main.log` / `desktop.log` / `api/api.log`)

## 故障排查

Expand All @@ -253,8 +253,8 @@ pnpm desktop:installer

| 平台 | 状态 | 说明 |
|------|------|------|
| Windows | ✅ 已验证 | Inno Setup 安装器(`dist/CatCafe-Setup-x.x.x.exe`) |
| macOS | ✅ 已验证 | DMG 安装器(`dist/CatCafe-{version}-{arch}.dmg`),2026-04-23 已补齐 clean macOS build/首启证据 |
| Windows | ✅ 已验证 | Inno Setup 安装器(`dist/ClowderAI-Setup-x.x.x.exe`) |
| macOS | ✅ 已验证 | DMG 安装器(`dist/ClowderAI-{version}-{arch}.dmg`),2026-04-23 已补齐 clean macOS build/首启证据 |
| Linux | ❌ 暂不支持 | 尚无 Linux 安装包 |

## 相关文档
Expand Down
20 changes: 10 additions & 10 deletions desktop/installer/cat-cafe.iss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; Cat Cafe — Inno Setup Installer Script
; Clowder AI — Inno Setup Installer Script
; Builds an offline Windows .exe installer that bundles source + deps + Electron shell.
;
; Prerequisites: Inno Setup 6.x (https://jrsoftware.org/isinfo.php)
Expand All @@ -14,29 +14,29 @@
; 5. Runs user-level Agent CLI hook sync under the invoking user profile
; 6. Creates desktop shortcut to the Electron app

#define MyAppName "Cat Cafe"
#define MyAppName "Clowder AI"
; MyAppVersion can be overridden by iscc /DMyAppVersion=X.Y.Z (CI release pipeline).
; Default kept for local manual builds.
#ifndef MyAppVersion
#define MyAppVersion "0.10.1"
#endif
#define MyAppPublisher "Cat Cafe"
#define MyAppURL "https://github.com/zts212653/cat-cafe"
#define MyAppExeName "Cat Cafe.exe"
#define MyAppPublisher "Clowder AI"
#define MyAppURL "https://github.com/zts212653/clowder-ai"
#define MyAppExeName "Clowder AI.exe"

[Setup]
AppId={{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
; Show just "Cat Cafe" in Add/Remove Programs, not "Cat Cafe 版本 X.Y.Z".
; Show just "Clowder AI" in Add/Remove Programs, not "Clowder AI 版本 X.Y.Z".
; The version is still available in the detail pane via AppVersion.
AppVerName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
DefaultDirName={autopf}\CatCafe
DefaultDirName={autopf}\ClowderAI
DefaultGroupName={#MyAppName}
OutputDir=..\..\dist
OutputBaseFilename=CatCafe-Setup-{#MyAppVersion}
OutputBaseFilename=ClowderAI-Setup-{#MyAppVersion}
Compression=lzma2/ultra64
SolidCompression=yes
WizardStyle=modern
Expand Down Expand Up @@ -179,7 +179,7 @@ Filename: "reg.exe"; \
; `npm install -g` fails on clean machines. Users install CLIs separately.
Filename: "powershell.exe"; \
Parameters: "-NoProfile -ExecutionPolicy Bypass -File ""{app}\scripts\post-install-offline.ps1"" -AppDir ""{app}"""; \
StatusMsg: "Configuring Cat Cafe..."; \
StatusMsg: "Configuring Clowder AI..."; \
Flags: runhidden waituntilterminated
; User-level Agent CLI hook sync writes to ~/.claude and ~/.codex, so it must
; run as the invoking user rather than the elevated installer account.
Expand All @@ -201,7 +201,7 @@ Filename: "{app}\desktop-dist\{#MyAppExeName}"; \

[UninstallRun]
Filename: "powershell.exe"; \
Parameters: "-ExecutionPolicy Bypass -Command ""Stop-Process -Name 'Cat Cafe' -Force -ErrorAction SilentlyContinue"""; \
Parameters: "-ExecutionPolicy Bypass -Command ""Stop-Process -Name 'Clowder AI' -Force -ErrorAction SilentlyContinue"""; \
Flags: runhidden

[UninstallDelete]
Expand Down
4 changes: 2 additions & 2 deletions desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"electron-builder": "26.8.1"
},
"build": {
"appId": "ai.catcafe.desktop",
"appId": "ai.clowderai.desktop",
"productName": "Clowder AI",
"artifactName": "CatCafe-${version}-${arch}.${ext}",
"artifactName": "ClowderAI-${version}-${arch}.${ext}",
"win": {
"target": "dir",
"icon": "assets/icon.ico"
Expand Down
12 changes: 6 additions & 6 deletions desktop/scripts/build-desktop.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#
.SYNOPSIS
Builds the Cat Cafe Windows installer package.
Builds the Clowder AI Windows installer package.

.DESCRIPTION
Full pipeline:
Expand All @@ -9,7 +9,7 @@
with flat hoisted node_modules (real files, no junctions)
3. Bundle Redis portable for offline install
4. Build the Electron shell (via desktop/ npm install + electron-builder)
5. Compile Inno Setup installer -> dist/CatCafe-Setup-x.x.x.exe
5. Compile Inno Setup installer -> dist/ClowderAI-Setup-x.x.x.exe

Why pnpm deploy (not tar of root node_modules): pnpm on Windows uses
junctions, which require absolute paths. A tarball of node_modules bakes in
Expand Down Expand Up @@ -229,7 +229,7 @@ if (Test-Path (Join-Path $bundledRedis "redis-server.exe")) {
} else {
New-Item -ItemType Directory -Path $bundledRedis -Force | Out-Null
Write-Host " Downloading Redis for Windows..."
$headers = @{ "User-Agent" = "CatCafe-Build" }
$headers = @{ "User-Agent" = "ClowderAI-Build" }
$releaseApi = "https://api.github.com/repos/redis-windows/redis-windows/releases/latest"
try {
$release = Invoke-RestMethod -Uri $releaseApi -Headers $headers -TimeoutSec 30
Expand Down Expand Up @@ -266,7 +266,7 @@ Install it with the official bootstrapper:

powershell -NoProfile -ExecutionPolicy Bypass -Command "Invoke-WebRequest -Uri https://antigravity.google/cli/install.cmd -OutFile `$env:TEMP\antigravity-cli-install.cmd; & `$env:TEMP\antigravity-cli-install.cmd"

Offline Cat Cafe packages intentionally do not vendor agy until Google
Offline Clowder AI packages intentionally do not vendor agy until Google
publishes a redistributable native binary contract.
"@ | Set-Content -Path $agyInstructionsPath -Encoding ascii
Write-Ok "agy-install-instructions.txt written"
Expand Down Expand Up @@ -406,7 +406,7 @@ if (-not $SkipInstaller) {
if ($LASTEXITCODE -ne 0) { Write-Err "Inno Setup compilation failed"; exit 1 }
Write-Ok "Installer built"

$outputExe = Get-ChildItem -Path $distDir -Filter "CatCafe-Setup-*.exe" | Select-Object -First 1
$outputExe = Get-ChildItem -Path $distDir -Filter "ClowderAI-Setup-*.exe" | Select-Object -First 1
Write-Host ""
Write-Host " ========================================" -ForegroundColor Green
Write-Host " Installer ready!" -ForegroundColor Green
Expand All @@ -428,7 +428,7 @@ if (-not $SkipPortableZip) {
$desktopPkgJson = Get-Content $desktopPkgPath -Raw | ConvertFrom-Json
$zipVersion = if ($env:CATCAFE_VERSION) { $env:CATCAFE_VERSION } else { $desktopPkgJson.version }

$stagingName = "CatCafe-$zipVersion"
$stagingName = "ClowderAI-$zipVersion"
$staging = Join-Path $distDir $stagingName
if (Test-Path $staging) { Remove-Item $staging -Recurse -Force }
New-Item -ItemType Directory -Path $staging -Force | Out-Null
Expand Down
8 changes: 4 additions & 4 deletions desktop/scripts/build-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# Mirrors desktop/scripts/build-desktop.ps1 for macOS. Outputs two DMGs
# (arm64 + x64) under dist/:
# CatCafe-0.10.1-arm64.dmg
# CatCafe-0.10.1-x64.dmg
# ClowderAI-0.10.1-arm64.dmg
# ClowderAI-0.10.1-x64.dmg
#
# Prerequisites on the build machine:
# - macOS 13+ (Xcode Command Line Tools: xcode-select --install)
Expand Down Expand Up @@ -386,7 +386,7 @@ for arch in "${ARCHS[@]}"; do
x64) app_dir="${DESKTOP_DIR}/dist/mac" ;;
*) die "Unsupported macOS arch: ${arch}" ;;
esac
dmg_name="CatCafe-${VERSION}-${arch}.dmg"
dmg_name="ClowderAI-${VERSION}-${arch}.dmg"
dmg_out="${DIST_DIR}/${dmg_name}"
if [[ ! -d "$app_dir" ]]; then
die "Expected app bundle directory not found for ${arch}: ${app_dir}"
Expand Down Expand Up @@ -458,7 +458,7 @@ done
echo ""
echo " ========================================"
echo " Installer(s) ready!"
for dmg in "${DIST_DIR}"/CatCafe-*-*.dmg; do
for dmg in "${DIST_DIR}"/ClowderAI-*-*.dmg; do
[[ -f "$dmg" ]] || continue
size_mb="$(stat -f "%z" "$dmg" 2>/dev/null | awk '{printf "%.2f", $1/1024/1024}')"
echo " $(basename "$dmg") (${size_mb} MB)"
Expand Down
6 changes: 3 additions & 3 deletions desktop/scripts/post-install-offline.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#
.SYNOPSIS
Post-install for the offline Cat Cafe installer.
Post-install for the offline Clowder AI installer.

.DESCRIPTION
Called by Inno Setup after file extraction.
Expand Down Expand Up @@ -190,11 +190,11 @@ if (Test-Path $redisExe) {
Write-Host ""
if ($allGood) {
Write-Host " ========================================" -ForegroundColor Green
Write-Host " Cat Cafe configured!" -ForegroundColor Green
Write-Host " Clowder AI configured!" -ForegroundColor Green
Write-Host " ========================================" -ForegroundColor Green
} else {
Write-Host " ========================================" -ForegroundColor Yellow
Write-Host " Cat Cafe installed with warnings" -ForegroundColor Yellow
Write-Host " Clowder AI installed with warnings" -ForegroundColor Yellow
Write-Host " ========================================" -ForegroundColor Yellow
}

Expand Down
14 changes: 7 additions & 7 deletions desktop/scripts/start-portable.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@echo off
setlocal EnableDelayedExpansion

rem Cat Cafe Portable — launch script
rem Clowder AI Portable — launch script
rem Detects first run, auto-configures, then starts the Electron app.
rem Equivalent to Inno Setup [Run] section but without admin requirement.

Expand All @@ -13,7 +13,7 @@ rem ── First-run configuration ───────────────
if not exist "%APPDIR%\.env" (
echo.
echo ============================================
echo Cat Cafe — First Run Configuration
echo Clowder AI — First Run Configuration
echo ============================================
echo.

Expand All @@ -24,7 +24,7 @@ if not exist "%APPDIR%\.env" (
echo.

rem Step 2: Sync Agent CLI hooks to user profile (~/.claude, ~/.codex)
rem so any existing CLI installations can connect to this Cat Cafe instance.
rem so any existing CLI installations can connect to this Clowder AI instance.
powershell -NoProfile -ExecutionPolicy Bypass -File "%APPDIR%\scripts\post-install-offline.ps1" -AppDir "%APPDIR%" -AgentHooksOnly
echo.

Expand All @@ -35,7 +35,7 @@ if not exist "%APPDIR%\.env" (

if errorlevel 1 (
echo [!!] Configuration encountered issues. See above for details.
echo Cat Cafe will still attempt to start.
echo Clowder AI will still attempt to start.
echo.
) else (
echo [OK] Configuration complete.
Expand All @@ -54,6 +54,6 @@ if errorlevel 1 (
)
)

rem ── Launch Cat Cafe ──────────────────────────────────────────────────
echo Starting Cat Cafe...
start "" "%APPDIR%\desktop-dist\Cat Cafe.exe"
rem ── Launch Clowder AI ──────────────────────────────────────────────────
echo Starting Clowder AI...
start "" "%APPDIR%\desktop-dist\Clowder AI.exe"
4 changes: 2 additions & 2 deletions desktop/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>Cat Cafe</title>
<title>Clowder AI</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
Expand Down Expand Up @@ -31,7 +31,7 @@
</head>
<body>
<div class="container">
<h1>Cat Cafe</h1>
<h1>Clowder AI</h1>
<p class="subtitle">Multi-Agent Collaboration Platform</p>
<div class="spinner"></div>
<p class="status" id="status">Starting services...</p>
Expand Down
Loading
Loading