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
23 changes: 13 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ UFO³ introduces **Galaxy**, a revolutionary multi-device orchestration framewor
| **Task Model** | Sequential ReAct Loop | DAG-based Constellation Workflows |
| **Scope** | Single device, multi-app | Multi-device, cross-platform |
| **Coordination** | HostAgent + AppAgents | ConstellationAgent + TaskOrchestrator |
| **Device Support** | Windows Desktop | Windows, Linux, macOS, Android, Web |
| **Device Support** | Windows Desktop | Windows, Linux, Android (more coming) |
| **Task Planning** | Application-level | Device-level with dependencies |
| **Execution** | Sequential | Parallel DAG execution |
| **Device Agent Role** | Standalone | Can serve as Galaxy device agent |
Expand Down Expand Up @@ -280,23 +280,26 @@ pip install -r requirements.txt
copy config\galaxy\agent.yaml.template config\galaxy\agent.yaml
# Edit and add your API keys

# 3. Start device agents (with platform flags)
# Windows:
python -m ufo.server.app --port 5000
python -m ufo.client.client --ws --ws-server ws://localhost:5000/ws --client-id windows_device_1 --platform windows
# 3. Configure devices
# Edit config\galaxy\devices.yaml to register your devices

# Linux:
python -m ufo.server.app --port 5001
python -m ufo.client.client --ws --ws-server ws://localhost:5001/ws --client-id linux_device_1 --platform linux
# 4. Start device agents (with platform flags)
# Windows: Start server + client
# Linux: Start server + MCP servers + client
# Mobile (Android): Start server + MCP servers + client
# See platform-specific guides for detailed setup

# 4. Launch Galaxy
# 5. Launch Galaxy
python -m galaxy --interactive
```

**📖 Complete Guide:**
- [Galaxy README](./galaxy/README.md) – Architecture & concepts
- [Online Quick Start](https://microsoft.github.io/UFO/getting_started/quick_start_galaxy/) – Step-by-step tutorial
- [Configuration](https://microsoft.github.io/UFO/configuration/system/galaxy_devices/) – Device setup
- [Windows Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_ufo2/)
- [Linux Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_linux/)
- [Mobile Device Setup](https://microsoft.github.io/UFO/getting_started/quick_start_mobile/) – Android agent setup
- [Configuration](https://microsoft.github.io/UFO/configuration/system/galaxy_devices/) – Device pool configuration

</td>
<td width="50%" valign="top">
Expand Down
27 changes: 15 additions & 12 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ UFO³ 引入了 **Galaxy**,这是一个革命性的多设备编排框架,可
| **任务模型** | 顺序 ReAct 循环 | 基于 DAG 的星座工作流 |
| **范围** | 单设备,多应用 | 多设备,跨平台 |
| **协调** | HostAgent + AppAgents | ConstellationAgent + TaskOrchestrator |
| **设备支持** | Windows 桌面 | Windows、Linux、macOS、Android、Web |
| **设备支持** | Windows 桌面 | Windows、Linux、Android(更多平台即将推出) |
| **任务规划** | 应用程序级别 | 设备级别,带依赖关系 |
| **执行** | 顺序 | 并行 DAG 执行 |
| **设备智能体角色** | 独立 | 可作为 Galaxy 设备智能体 |
Expand Down Expand Up @@ -268,30 +268,33 @@ UFO² 扮演双重角色:**独立 Windows 自动化**和 Windows 平台的 **G
**用于跨设备编排**

```powershell
# 1. 安装
# 1. 安装依赖
pip install -r requirements.txt

# 2. 配置 ConstellationAgent
copy config\galaxy\agent.yaml.template config\galaxy\agent.yaml
# 编辑并添加您的 API 密钥
# 编辑配置文件,添加 API Key

# 3. 启动设备智能体(带平台标志)
# Windows:
python -m ufo.server.app --port 5000
python -m ufo.client.client --ws --ws-server ws://localhost:5000/ws --client-id windows_device_1 --platform windows
# 3. 配置设备
# 编辑 config\galaxy\devices.yaml 注册您的设备

# Linux:
python -m ufo.server.app --port 5001
python -m ufo.client.client --ws --ws-server ws://localhost:5001/ws --client-id linux_device_1 --platform linux
# 4. 启动设备智能体(带平台标志)
# Windows: 启动服务器 + 客户端
# Linux: 启动服务器 + MCP 服务器 + 客户端
# Mobile (Android): 启动服务器 + MCP 服务器 + 客户端
# 请参阅特定平台指南了解详细设置

# 4. 启动 Galaxy
# 5. 启动 Galaxy
python -m galaxy --interactive
```

**📖 完整指南:**
- [Galaxy 中文文档](./galaxy/README_ZH.md) – 架构和概念
- [在线快速入门](https://microsoft.github.io/UFO/getting_started/quick_start_galaxy/) – 分步教程
- [配置](https://microsoft.github.io/UFO/configuration/system/galaxy_devices/) – 设备设置
- [Windows 设备设置](https://microsoft.github.io/UFO/getting_started/quick_start_ufo2/)
- [Linux 设备设置](https://microsoft.github.io/UFO/getting_started/quick_start_linux/)
- [Mobile 设备设置](https://microsoft.github.io/UFO/getting_started/quick_start_mobile/) – Android 智能体设置
- [配置](https://microsoft.github.io/UFO/configuration/system/galaxy_devices/) – 设备池配置

</td>
<td width="50%" valign="top">
Expand Down
79 changes: 79 additions & 0 deletions aip/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,3 +474,82 @@ def validate_server_message(msg: ServerMessage) -> bool:
return False

return True


# ============================================================================
# Binary Transfer Message Types (New Feature)
# ============================================================================


class BinaryMetadata(BaseModel):
"""
Metadata for binary data transfer.

This metadata is sent as a text frame before the actual binary data,
allowing receivers to prepare for and validate incoming binary transfers.
"""

type: Literal["binary_data"] = "binary_data"
filename: Optional[str] = None
mime_type: Optional[str] = None
size: int = Field(..., description="Size of binary data in bytes")
checksum: Optional[str] = Field(
None, description="MD5 or SHA256 checksum for validation"
)
session_id: Optional[str] = None
description: Optional[str] = None
timestamp: Optional[str] = None
# Allow additional custom fields
model_config = ConfigDict(extra="allow")


class FileTransferStart(BaseModel):
"""
Message to initiate a chunked file transfer.

Sent before sending file chunks to inform the receiver about
the file details and transfer parameters.
"""

type: Literal["file_transfer_start"] = "file_transfer_start"
filename: str = Field(..., description="Name of file being transferred")
size: int = Field(..., description="Total file size in bytes")
chunk_size: int = Field(..., description="Size of each chunk in bytes")
total_chunks: int = Field(..., description="Total number of chunks")
mime_type: Optional[str] = Field(None, description="MIME type of file")
session_id: Optional[str] = None
description: Optional[str] = None
# Allow additional custom fields
model_config = ConfigDict(extra="allow")


class FileTransferComplete(BaseModel):
"""
Message to signal completion of a chunked file transfer.

Sent after all file chunks have been transmitted, includes
checksum for validation.
"""

type: Literal["file_transfer_complete"] = "file_transfer_complete"
filename: str = Field(..., description="Name of transferred file")
total_chunks: int = Field(..., description="Total chunks sent")
checksum: Optional[str] = Field(None, description="MD5 checksum of complete file")
session_id: Optional[str] = None
# Allow additional custom fields
model_config = ConfigDict(extra="allow")


class ChunkMetadata(BaseModel):
"""
Metadata for a single file chunk.

Sent with each chunk during chunked file transfer to track
chunk sequence and validate chunk integrity.
"""

chunk_num: int = Field(..., description="Chunk sequence number (0-indexed)")
chunk_size: int = Field(..., description="Size of this chunk in bytes")
checksum: Optional[str] = Field(None, description="Checksum of this chunk")
# Allow additional custom fields
model_config = ConfigDict(extra="allow")
Loading
Loading