chore: remove openfang-runtime and update start script
This commit is contained in:
@@ -1,76 +0,0 @@
|
||||
# OpenFang Bundled Runtime
|
||||
|
||||
This directory contains the bundled OpenFang runtime for ZClaw Desktop.
|
||||
|
||||
## Architecture
|
||||
|
||||
OpenFang is a **single Rust binary** (~32MB) that runs as the Agent OS backend.
|
||||
|
||||
```
|
||||
openfang-runtime/
|
||||
├── openfang.exe # Windows binary
|
||||
├── openfang-x86_64-unknown-linux-gnu # Linux x64 binary
|
||||
├── openfang-aarch64-unknown-linux-gnu # Linux ARM64 binary
|
||||
├── openfang-x86_64-apple-darwin # macOS Intel binary
|
||||
├── openfang-aarch64-apple-darwin # macOS Apple Silicon binary
|
||||
├── runtime-manifest.json # Runtime metadata
|
||||
├── openfang.cmd # Windows launcher
|
||||
├── openfang.sh # Unix launcher
|
||||
├── download-openfang.ps1 # Windows download script
|
||||
└── download-openfang.sh # Unix download script
|
||||
```
|
||||
|
||||
## Setup
|
||||
|
||||
### Option 1: Download Binary
|
||||
|
||||
**Windows (PowerShell):**
|
||||
```powershell
|
||||
cd desktop/src-tauri/resources/openfang-runtime
|
||||
.\download-openfang.ps1
|
||||
```
|
||||
|
||||
**Linux/macOS:**
|
||||
```bash
|
||||
cd desktop/src-tauri/resources/openfang-runtime
|
||||
chmod +x download-openfang.sh
|
||||
./download-openfang.sh
|
||||
```
|
||||
|
||||
### Option 2: Manual Download
|
||||
|
||||
1. Go to https://github.com/RightNow-AI/openfang/releases
|
||||
2. Download the appropriate binary for your platform
|
||||
3. Place it in this directory
|
||||
|
||||
## Build Integration
|
||||
|
||||
The Tauri build process will include this directory in the application bundle:
|
||||
|
||||
```json
|
||||
// tauri.conf.json
|
||||
{
|
||||
"bundle": {
|
||||
"resources": ["resources/openfang-runtime/"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Runtime Resolution
|
||||
|
||||
ZClaw Desktop resolves the OpenFang runtime in this order:
|
||||
|
||||
1. `ZCLAW_OPENFANG_BIN` environment variable (for development)
|
||||
2. Bundled `openfang-runtime/` directory
|
||||
3. System PATH (`openfang`)
|
||||
|
||||
## Endpoints
|
||||
|
||||
- **WebSocket**: `ws://127.0.0.1:4200/ws`
|
||||
- **REST API**: `http://127.0.0.1:4200/api`
|
||||
|
||||
## Version Info
|
||||
|
||||
- OpenFang Version: 2026.3.13
|
||||
- Port: 4200 (was 18789 for OpenClaw)
|
||||
- Config: `~/.openfang/openfang.toml` (was `~/.openclaw/openclaw.json`)
|
||||
@@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
REM OpenFang Agent OS - Bundled Binary Launcher
|
||||
"%~dp0openfang.exe" %*
|
||||
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
# OpenFang Agent OS - Bundled Binary Launcher
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
exec "$SCRIPT_DIR/openfang.exe" "$@"
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"source": {
|
||||
"binPath": "openfang.exe",
|
||||
"binPathLinux": "openfang-x86_64-unknown-linux-gnu",
|
||||
"binPathMac": "openfang-x86_64-apple-darwin",
|
||||
"binPathMacArm": "openfang-aarch64-apple-darwin"
|
||||
},
|
||||
"stagedAt": "2026-03-13T09:08:38.514Z",
|
||||
"version": "2026.03.13",
|
||||
"runtimeType": "openfang",
|
||||
"description": "OpenFang Agent OS - Single binary runtime (~32MB)",
|
||||
"endpoints": {
|
||||
"websocket": "ws://127.0.0.1:4200/ws",
|
||||
"rest": "http://127.0.0.1:4200/api"
|
||||
},
|
||||
"platform": {
|
||||
"os": "win32",
|
||||
"arch": "x64"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
# ZCLAW Full Stack Start Script
|
||||
# Starts: ChromeDriver (optional) -> Tauri Desktop (manages OpenFang internally)
|
||||
# Starts: ChromeDriver (optional) -> Tauri Desktop
|
||||
#
|
||||
# NOTE: OpenFang is bundled with Tauri and managed internally.
|
||||
# The frontend uses Tauri commands (gateway_start/gateway_status) to control OpenFang.
|
||||
# No external OpenFang CLI installation is required.
|
||||
# NOTE: ZCLAW now uses internal Kernel (zclaw-kernel) for all operations.
|
||||
# No external OpenFang runtime is required.
|
||||
|
||||
param(
|
||||
[switch]$NoBrowser,
|
||||
@@ -38,9 +37,8 @@ Options:
|
||||
-Help Show this help
|
||||
|
||||
Note:
|
||||
OpenFang is bundled with the Tauri app and managed internally.
|
||||
The app will start OpenFang automatically via Tauri commands.
|
||||
No external OpenFang CLI installation required.
|
||||
ZCLAW uses an internal Rust-based Kernel for all operations.
|
||||
No external runtime is required.
|
||||
|
||||
Quick Commands:
|
||||
pnpm start # Start all services
|
||||
@@ -59,7 +57,7 @@ if ($Stop) {
|
||||
Get-Process -Name "chromedriver" -ErrorAction SilentlyContinue | Stop-Process -Force
|
||||
ok "ChromeDriver stopped"
|
||||
|
||||
# Stop any process on port 4200 (OpenFang)
|
||||
# Stop any process on port 4200 (legacy, may still be in use)
|
||||
$port4200 = netstat -ano | Select-String ":4200.*LISTENING"
|
||||
if ($port4200) {
|
||||
$pid4200 = ($port4200 -split '\s+')[-1]
|
||||
@@ -90,7 +88,7 @@ if ($Stop) {
|
||||
|
||||
Write-Host ""
|
||||
Write-Host "===============================================" -ForegroundColor Magenta
|
||||
Write-Host " ZCLAW - OpenFang Desktop Client" -ForegroundColor Magenta
|
||||
Write-Host " ZCLAW - AI Agent Desktop Client" -ForegroundColor Magenta
|
||||
Write-Host "===============================================" -ForegroundColor Magenta
|
||||
Write-Host ""
|
||||
|
||||
@@ -148,21 +146,7 @@ if (-not $NoBrowser) {
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# 2. Check OpenFang Runtime
|
||||
info "Checking OpenFang runtime..."
|
||||
$runtimePath = "$ScriptDir/desktop/src-tauri/resources/openfang-runtime"
|
||||
if (Test-Path "$runtimePath/openfang.exe") {
|
||||
ok "OpenFang runtime found (bundled)"
|
||||
} elseif (Test-Path "$runtimePath/openfang") {
|
||||
ok "OpenFang runtime found (bundled)"
|
||||
} else {
|
||||
warn "OpenFang runtime not found at $runtimePath"
|
||||
info "Run: cd desktop && pnpm prepare:openfang-runtime"
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
|
||||
# 3. Start Tauri Desktop
|
||||
# 2. Start Tauri Desktop
|
||||
info "Starting ZCLAW Desktop..."
|
||||
Set-Location "$ScriptDir/desktop"
|
||||
|
||||
@@ -179,7 +163,6 @@ if ($port1420) {
|
||||
|
||||
if ($Dev) {
|
||||
info "Development mode enabled"
|
||||
info "OpenFang will be started by the app via Tauri commands"
|
||||
pnpm tauri dev
|
||||
} else {
|
||||
$exe = "src-tauri\target\release\ZClaw.exe"
|
||||
|
||||
Reference in New Issue
Block a user