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
6 changes: 3 additions & 3 deletions .github/workflows/fnos-build-fpk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
uses: docker/build-push-action@v6
with:
context: .
file: fnos/Dockerfile
file: fnos/docker/Dockerfile
push: true
tags: |
ghcr.io/TencentCloud/octop:vanilla
Expand Down Expand Up @@ -180,8 +180,8 @@ jobs:
set -x
LOG="${{ github.workspace }}/native-install.log"
: > "$LOG"
mkdir -p "${{ github.workspace }}/fnos-native/app/site-packages"
SP="${{ github.workspace }}/fnos-native/app/site-packages"
mkdir -p "${{ github.workspace }}/fnos/native/app/site-packages"
SP="${{ github.workspace }}/fnos/native/app/site-packages"
{
# 用 uv 安装核心 whl 及其依赖到包内 site-packages。
# pip 对 orcakit-harness-agent[all] 的复杂依赖树会报 resolution-too-deep,
Expand Down
61 changes: 31 additions & 30 deletions fnos/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,42 @@ After install, open the app (Docker: `http://<device-ip>:8088`, native: `http://
## 目录结构

```
fnos/ # Docker 版(docker-project)
├── manifest # 应用元信息(platform=all / 名称/版本/桌面入口等)
├── ICON.PNG / ICON_256.PNG
├── LICENSE # 复用仓库根 LICENSE(MIT)
├── cmd/ # 生命周期脚本(main / install_callback / config_callback 等)
├── config/
│ ├── privilege # 权限声明(docker-octop 用户)
│ └── resource # 资源声明(docker-project + 数据共享目录)
├── wizard/
│ └── install # 安装向导(可配置管理员账号/密码、日志级别、LLM 密钥)
├── app/
│ ├── docker/
│ │ └── docker-compose.yaml # 引用 ghcr.io/TencentCloud/octop:latest
│ └── ui/
│ ├── config # 桌面图标入口
│ └── images/icon-{64,256}.png
└── Dockerfile # 从仓库源码构建镜像,安装全部附加组件(browser + desktop)

fnos-native/ # 本地版(非 Docker 的 FnOS 原生 app)
├── manifest # platform=all + 原生 app 元信息
├── cmd/ # 生命周期脚本(main / install_callback / config_callback)
├── config/
│ ├── privilege # 权限声明(root,用于补装 Chromium 系统库)
│ └── resource # data-share + usr-local-linker
├── app/
│ ├── bin/octop # 启动器(用自带 Python 运行时启动 octop init/run)
│ └── ui/ # 桌面图标入口
└── wizard/ # 安装/配置/卸载/升级向导
fnos/
├── README.md
├── docker/ # Docker 版(docker-project)
│ ├── manifest # 应用元信息(platform=all / 名称/版本/桌面入口等)
│ ├── ICON.PNG / ICON_256.PNG
│ ├── LICENSE # 复用仓库根 LICENSE(MIT)
│ ├── cmd/ # 生命周期脚本(main / install_callback / config_callback 等)
│ ├── config/
│ │ ├── privilege # 权限声明(docker-octop 用户)
│ │ └── resource # 资源声明(docker-project + 数据共享目录)
│ ├── wizard/
│ │ └── install # 安装向导(可配置管理员账号/密码、日志级别、LLM 密钥)
│ ├── app/
│ │ ├── docker/
│ │ │ └── docker-compose.yaml # 引用 ghcr.io/TencentCloud/octop:latest
│ │ └── ui/
│ │ ├── config # 桌面图标入口
│ │ └── images/icon-{64,256}.png
│ └── Dockerfile # 从仓库源码构建镜像,安装全部附加组件(browser + desktop)
└── native/ # 本地版(非 Docker 的 FnOS 原生 app)
├── manifest # platform=all + 原生 app 元信息
├── cmd/ # 生命周期脚本(main / install_callback / config_callback)
├── config/
│ ├── privilege # 权限声明(root,用于补装 Chromium 系统库)
│ └── resource # data-share + usr-local-linker
├── app/
│ ├── bin/octop # 启动器(用自带 Python 运行时启动 octop init/run)
│ └── ui/ # 桌面图标入口
└── wizard/ # 安装/配置/卸载/升级向导
```

## 工作机制

1. **源码同步**:`.github/workflows/zz-sync-upstream.yml` 每 6 小时把上游 `TencentCloud/Octop` 的更新合并进本仓 `main` 分支(使用仓库自带 `GITHUB_TOKEN`,无需 PAT)。
2. **镜像构建**:`.github/workflows/zz-build-fpk.yml` 的 `image` job 在 `main` 更新时,用 `fnos/Dockerfile` 从仓库源码构建 Octop 镜像并推送到 `ghcr.io/TencentCloud/octop:latest`(含全部附加组件)。
3. **安装包构建**:同一 workflow 的 `fpk` job 用 `scripts/build-fpk.sh` 把 `fnos/` 打成 Docker 版 `.fpk`;`native` job 用 python-build-standalone 构建 Python 3.12 运行时、安装全部依赖与 Playwright Chromium,打成本地版 `.fpk`(`continue-on-error`,失败不阻塞 Docker 版)。两者均以滚动发布 `fnos-latest` 提供下载。
2. **镜像构建**:`.github/workflows/fnos-build-fpk.yml` 的 `image` job 在 `main` 更新时,用 `fnos/docker/Dockerfile` 从仓库源码构建 Octop 镜像并推送到 `ghcr.io/TencentCloud/octop:latest`(含全部附加组件)。
3. **安装包构建**:同一 workflow 的 `fpk` job 用 `scripts/build-fpk.sh` 把 `fnos/docker/` 打成 Docker 版 `.fpk`;`native` job 用 python-build-standalone 构建 Python 3.12 运行时、安装全部依赖与 Playwright Chromium,把 `fnos/native/` 打成本地版 `.fpk`(`continue-on-error`,失败不阻塞 Docker 版)。两者均以滚动发布 `fnos-latest` 提供下载。

## 本地构建 .fpk(无需 Docker)

Expand Down
2 changes: 1 addition & 1 deletion fnos/Dockerfile → fnos/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# - desktop (mss / pynput / pillow,桌面控制附加组件)
#
# 构建上下文必须为仓库根目录(fnpack / CI 中以仓库根为 context):
# docker build -f fnos/Dockerfile -t ghcr.io/TencentCloud/octop:latest .
# docker build -f fnos/docker/Dockerfile -t ghcr.io/TencentCloud/octop:latest .
#
# 国内加速(可选 build-arg):
# PIP_INDEX_URL / PIP_TRUSTED_HOST / NPM_REGISTRY / APT_MIRROR
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions scripts/build-fpk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ build_one() {
local KIND="$1" PKG OUTNAME
case "$KIND" in
docker)
PKG="$ROOT/fnos"
PKG="$ROOT/fnos/docker"
OUTNAME="${PREFIX}-${VER}${ITER_SUFFIX}.fpk"
;;
native)
PKG="$ROOT/fnos-native"
PKG="$ROOT/fnos/native"
OUTNAME="${PREFIX}-native-${VER}${ITER_SUFFIX}.fpk"
;;
*) echo "未知类型: $KIND"; return 1 ;;
Expand Down
2 changes: 1 addition & 1 deletion scripts/fnos/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Octop FnOS 打包共享函数库。
# 仓库唯一来源:scripts/fnos/common.sh
# 打包时由 scripts/build-fpk.sh 注入到包内 cmd/common.sh;
# fnos/ 与 fnos-native/ 的 cmd 脚本及 app/bin 脚本统一 source 本文件,
# fnos/docker/ 与 fnos/native/ 的 cmd 脚本及 app/bin 脚本统一 source 本文件,
# 避免 find_python312 / fix_ownership_and_perms / free_octop_ports 重复维护。
#
set -u
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_subagents_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def test_catalog_divisions(env: Any) -> None:
r = await c.get("/api/subagent-catalog/divisions", headers=auth)
assert r.status_code == 200, r.text
rows = r.json()
assert len(rows) == 16
assert len(rows) == 19
assert any(row["id"] == "engineering" and row["count"] > 0 for row in rows)


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/agents/test_subagent_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test_bundled_library_non_empty() -> None:
catalog = SubagentCatalog(default_package_root())
catalog.refresh()
assert len(catalog.list_summaries()) > 100
assert len(catalog.list_divisions()) == 16
assert len(catalog.list_divisions()) == 19
assert catalog.get("engineering-software-architect") is not None


Expand Down
Loading