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
1 change: 0 additions & 1 deletion .github/workflows/build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ jobs:
mkdir -p bin
version_ldflag="-X github.com/MaimoryLab/OneAgent/internal/version.Version=$RELEASE_VERSION"
go build -tags wails,production -trimpath -buildvcs=false -ldflags="${{ matrix.target.desktop_ldflags }} $version_ldflag" -o "bin/oneagent-desktop${{ matrix.target.suffix }}" ./cmd/oneagent-desktop
go build -trimpath -buildvcs=false -ldflags="-w -s $version_ldflag" -o "bin/oneagent${{ matrix.target.suffix }}" ./cmd/oneagent

- name: Package macOS app
if: matrix.target.platform == 'macos'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ __pycache__/
output/
.qoder/

# Go CLI 与桌面壳的本地构建产物;scripts/install.* 只转发,不构建
# Go 桌面应用的本地构建产物
bin/

# 公开站已迁出到 MaimoryLab/OneAgent-site。这一条留着是因为迁出前克隆过本仓库的
Expand Down
5 changes: 1 addition & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OneAgent 开发约定

当前分支是 Go/Wails 收尾线,版本为 `0.3.0-dev`。桌面入口是 `cmd/oneagent-desktop`,headless CLI 是 `cmd/oneagent`;两者共享 `internal/` 用例。React 只通过生成的 Wails bindings 调用后端。
当前分支是 Go/Wails 收尾线,版本为 `0.3.0-dev`。唯一产品入口是 `cmd/oneagent-desktop`。React 只通过生成的 Wails bindings 调用后端。

## 目录

Expand All @@ -10,7 +10,6 @@
- `internal/install`:默认最新、可选精确版本的 Agent 包安装,registry 选择、Node.js/uv 运行时引导(下载、校验、解压、写入 PATH)和 Aider Python 管理边界。
- `internal/profile`、`internal/securefs`:profile、secret、备份、权限和原子写。
- `internal/binding`:Wails 暴露给前端的五个 service,是 React 与 Go 的唯一接缝。改这里的 DTO 必须重新生成 `frontend/bindings` 并同步 `frontend/src/backend/wails.ts`。
- `cmd/oneagent`:纯 Go headless CLI。
- `cmd/oneagent-desktop`:Wails 桌面入口。
- `frontend/bindings`:Wails 生成物,禁止手工编辑。

Expand All @@ -28,8 +27,6 @@
go test ./...
go test -race ./...
go vet ./...
go build -o bin/oneagent ./cmd/oneagent

cd frontend
pnpm install --frozen-lockfile
pnpm run test
Expand Down
35 changes: 6 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

**English** · [简体中文](README_ZH.md)

OneAgent is a local AI development environment activator. A React wizard and a pure Go
CLI share the same Go use cases: detecting agents, installing the latest version, probing
Providers, merging configuration, creating backups, and tightening permissions. The
desktop app uses Wails v3 bindings, and the production process listens on no application
TCP port.
OneAgent is a local AI development environment activator. Its React wizard detects
agents, installs the latest version, probes Providers, merges configuration, creates
backups, and tightens permissions through Wails v3 bindings. The production process
listens on no application TCP port.

OneAgent does not redistribute agent packages, and it bundles no Node.js, system WebView,
Git, or API key. When a prerequisite is missing it returns a specific error and points at
Expand Down Expand Up @@ -38,8 +37,6 @@ Status / Provider / Agent / Profile services
Go application use cases
|
catalog / provider / install / config / profile / securefs

Pure Go CLI --------------------^
```

The public website is neither in this diagram nor in this repository. It moved to
Expand All @@ -50,8 +47,7 @@ those two files here does not change the site, and should not: the site describe
published version supports.

- `cmd/oneagent-desktop`: the Wails desktop entry point.
- `cmd/oneagent`: the pure Go headless CLI.
- `internal/`: the Go core shared by desktop and CLI.
- `internal/`: the Go application core.
- `frontend/`: the React app. Release packages carry only its built static assets.
- `agents.lock.json`: the single manifest of agent package names, sources, config
adapters, and licences. It pins neither agent versions nor package hashes.
Expand All @@ -75,23 +71,6 @@ A production build needs the target platform's Wails/WebView dependencies. Linux
currently uses the `gtk3` tag (Ubuntu 22.04 cleanroom), macOS uses the system WKWebView,
and Windows uses the WebView2 Runtime.

### CLI

```bash
go build -o bin/oneagent ./cmd/oneagent
```

On Windows CMD:

```cmd
go build -o bin\oneagent.exe .\cmd\oneagent
bin\oneagent.exe agent set codex --provider ppio --model your-model-id --api-key your-api-key
```

Day to day, pass credentials by pasting into the desktop app or from a saved profile.
`ONEAGENT_API_KEY` and `--api-key` exist for controlled scripts. `--registry` defaults to
the official npm registry; a mirror must be chosen explicitly and must use HTTPS.

## Agents and Providers

Automatically configured agents:
Expand All @@ -107,9 +86,7 @@ Automatically configured agents:
| Hermes Agent | `hermes-agent` | official Bash / PowerShell script | OpenAI-compatible |

For npm- and uv-managed agents, the installer resolves the latest version by default.
To reproduce a specific one, pass `--agent-version VERSION`, for example
`oneagent --agent codex --install-agent --check-agent-only --agent-version 0.145.0`.
Hermes's official script owns its version selection and does not accept this option.
Hermes's official script owns its version selection.

OpenClaw is a gateway, and OneAgent's scope for it stops at the model provider. It
installs the package and writes the provider and default model into
Expand Down
26 changes: 4 additions & 22 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[English](README.md) · **简体中文**

OneAgent 是一个本地 AI 开发环境激活器。React 向导和纯 Go CLI 共用同一套 Go 用例,负责检测 Agent、安装最新版本、探测 Provider、合并配置、创建备份并收紧权限。桌面应用使用 Wails v3 binding;生产进程不监听业务 TCP 端口。
OneAgent 是一个本地 AI 开发环境激活器。React 向导通过 Wails v3 binding 检测 Agent、安装最新版本、探测 Provider、合并配置、创建备份并收紧权限;生产进程不监听业务 TCP 端口。

OneAgent 不重新分发 Agent 包,也不捆绑 Node.js、系统 WebView、Git 或 API Key。缺少运行前置条件时返回明确错误和官方安装指引。

Expand All @@ -25,8 +25,6 @@ Status / Provider / Agent / Profile services
Go application use cases
|
catalog / provider / install / config / profile / securefs

Pure Go CLI --------------------^
```

公开站不在这张图里,也不在这个仓库里:它已迁出到
Expand All @@ -35,8 +33,7 @@ GitHub Releases API 读取下载信息,并把 `agents.lock.json`、`providers.
vendor 到自己仓库,从发行 tag 刷新——改本仓库这两个文件不会自动改变站上内容,也不应该:站描述的是已发布版本支持什么。

- `cmd/oneagent-desktop`:Wails 桌面入口。
- `cmd/oneagent`:纯 Go headless CLI。
- `internal/`:桌面和 CLI 共用的 Go 核心。
- `internal/`:Go 应用核心。
- `frontend/`:React 应用;发行包只携带构建后的静态资源。
- `agents.lock.json`:Agent 包名、来源、配置适配器和许可证的唯一清单;不固定 Agent 版本或包哈希。
- `providers.lock.json`:内置 Provider 端点、fallback probe model 和公开站披露字段清单;用户 Provider 保存在本机 `~/.oneagent/providers.json`。
Expand All @@ -55,21 +52,6 @@ go run -tags wails ./cmd/oneagent-desktop

生产构建需要目标平台的 Wails/WebView 依赖。Linux 当前使用 `gtk3` tag(Ubuntu 22.04 cleanroom);macOS 使用系统 WKWebView;Windows 使用 WebView2 Runtime。

### CLI

```bash
go build -o bin/oneagent ./cmd/oneagent
```

Windows CMD:

```cmd
go build -o bin\oneagent.exe .\cmd\oneagent
bin\oneagent.exe agent set codex --provider ppio --model your-model-id --api-key your-api-key
```

日常使用优先通过桌面粘贴或已保存 profile 传递凭据;`ONEAGENT_API_KEY` 和 `--api-key` 仅保留给受控脚本。`--registry` 默认是官方 npm registry,镜像必须显式选择并使用 HTTPS。

## Agent 与 Provider

自动配置 Agent:
Expand All @@ -84,7 +66,7 @@ bin\oneagent.exe agent set codex --provider ppio --model your-model-id --api-key
| OpenClaw | `openclaw` | npm | OpenAI-compatible |
| Hermes Agent | `hermes-agent` | 官方 Bash / PowerShell 脚本 | OpenAI-compatible |

npm 和 uv 管理的 Agent 默认解析最新版本。需要复现特定版本时可传 `--agent-version VERSION`,例如 `oneagent --agent codex --install-agent --check-agent-only --agent-version 0.145.0`。Hermes 的版本选择由官方脚本负责,不接受这个参数
npm 和 uv 管理的 Agent 默认解析最新版本。Hermes 的版本选择由官方脚本负责。

OpenClaw 是网关,OneAgent 对它的职责止于模型供应商:安装包,并把 provider 与默认模型写入 `~/.openclaw/openclaw.json`,不改动 `channels`、`tools` 等其余任何小节。启动网关、注册为系统服务、配对聊天渠道仍由 OpenClaw 自己的命令负责,配置完成后运行 `openclaw onboard`。OneAgent 不启动后台服务。

Expand Down Expand Up @@ -127,7 +109,7 @@ python3 scripts/check-docs.py

## 发行

发行包由 `.github/workflows/build-artifacts.yml` 构建,手动触发(`workflow_dispatch`)。它为 macOS 与 Windows 各构建 x64/arm64 的 Wails 桌面二进制和纯 Go CLI,macOS 产物打成 `.app`。
发行包由 `.github/workflows/build-artifacts.yml` 构建,手动触发(`workflow_dispatch`)。它为 macOS 与 Windows 各构建 x64/arm64 的 Wails 桌面应用,macOS 产物打成 `.app`。

Wails 仍处于 Alpha,当前不发布 Stable,不做平台签名、公证或商店分发。Stable 的签名门禁保留在后续发行阶段。

Expand Down
6 changes: 0 additions & 6 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ tasks:
cmds:
- go test ./...

build:cli:
summary: Build the headless Go CLI
cmds:
- mkdir -p {{.BIN_DIR}}
- go build -o {{.BIN_DIR}}/oneagent ./cmd/oneagent

generate:bindings:
summary: Regenerate Wails TypeScript bindings
cmds:
Expand Down
4 changes: 2 additions & 2 deletions cmd/oneagent-desktop/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "fmt"

func main() {
// The default build is intentionally headless and dependency-free. Native
// Wails builds opt into the wails tag so Go tests and the CLI do not link a
// platform WebView by accident.
// Wails builds opt into the wails tag so Go tests do not link a platform
// WebView by accident.
fmt.Println("OneAgent desktop shell: build with -tags wails")
}
Loading