From 14d15862d4404b033e6a9e6b4eab33f392064d81 Mon Sep 17 00:00:00 2001 From: yujiezhang-ops Date: Tue, 4 Aug 2026 19:53:47 +0800 Subject: [PATCH] chore: add Apache-2.0 and NOTICE, and retire the docs that outlived their tools The repository had no LICENSE at all, which in a public repository means "all rights reserved": nobody could legally fork, modify or `go get` a module whose path is already github.com/MaimoryLab/OneAgent. Apache-2.0 was chosen for its explicit patent grant and trademark clause. NOTICE is the other half. distribution-compliance-policy.md has always required a third-party licence manifest as a release precondition, but the tool that generated it (cmd/oneagent-release) was removed in 23805b0, so the obligation had no implementation. Every entry is read from disk rather than assumed: the five Go modules actually linked into the desktop binary via `go list -deps`, the five npm packages in the bundle, and the two runtimes from runtimes.lock.json. The trademark section covers the eight Agent marks in frontend/src/components/icons/assets, which agents.tsx already documents as nominative use. Three documents are removed rather than edited. agent-installer-target-versions.md was internal strategy -- four unpublished conversion targets, SSO and unified billing plans, and a hosted model gateway that product-boundary-baseline.md explicitly lists as out of scope, so publishing both would have promised and denied the same thing. The two concept documents were generation logs: one carried a private image-proxy endpoint, and between them seventeen image links point into the gitignored output/ directory, so they would have rendered as broken images to any reader. Twelve documents cited cmd/oneagent-release, cmd/oneagent-rc or cmd/oneagent-provider-smoke, none of which exist. Removing them was deliberate -- 23805b0 replaced them with build-artifacts.yml -- so the docs are corrected rather than the tools restored. README and CLAUDE.md now describe the workflow that runs; historical documents keep their conclusions and gain a note saying the commands are background. Their command blocks are retagged from `bash` to `text`, because a header note does not stop someone scrolling to a shell block and running it. README also loses `task test:native`, a target no Taskfile defines. Two ADRs both claimed number 006. The public-site one becomes ADR-009, since ADR-008's Supersedes line refers to the multi-profile one; ADR-006 now says on its first line that its credential half is superseded, which previously appeared only sixty lines down. frontend/dist/.keep is restored: de3ed69 deleted it again, which re-broke `go vet` on a fresh clone in exactly the way #16 fixed. The cc-switch notes keep their findings but drop two conclusions that read as disparaging a named individual's project; both are rewritten as the methodological point they were actually making. Co-Authored-By: Claude Fable 5 --- CLAUDE.md | 29 +-- LICENSE | 202 ++++++++++++++++++ NOTICE | 66 ++++++ README.md | 59 ++--- docs/agent-installer-target-versions.md | 186 ---------------- docs/blank-machine-verification-plan.md | 6 +- docs/cc-switch-reference-notes.md | 4 +- docs/config-chain-audit.md | 6 +- ...platform-python-core-and-release-policy.md | 4 + ...nel-neutral-distribution-and-compliance.md | 4 + ...-multi-profile-and-long-term-management.md | 3 +- ...ublic-site-and-generated-release-index.md} | 5 +- docs/distribution-compliance-policy.md | 5 +- docs/frontend-component-redesign-plan.md | 6 +- docs/oneagent-concept-prompts.md | 191 ----------------- docs/oneagent-concept-review.md | 156 -------------- docs/per-agent-config-plan.md | 6 +- docs/provider-rc-testing.md | 13 +- docs/public-site-operations.md | 2 +- docs/recent-work-summary.md | 6 +- .../release-evidence/0.2.0-dev-macos-arm64.md | 4 + docs/wails-v3-migration-plan.md | 8 +- frontend/dist/.keep | 0 frontend/package.json | 1 + 24 files changed, 365 insertions(+), 607 deletions(-) create mode 100644 LICENSE create mode 100644 NOTICE delete mode 100644 docs/agent-installer-target-versions.md rename docs/decisions/{ADR-006-public-site-and-generated-release-index.md => ADR-009-public-site-and-generated-release-index.md} (88%) delete mode 100644 docs/oneagent-concept-prompts.md delete mode 100644 docs/oneagent-concept-review.md create mode 100644 frontend/dist/.keep diff --git a/CLAUDE.md b/CLAUDE.md index 99bee9a..649b99b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -10,11 +10,14 @@ - `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` -- `cmd/oneagent-release`:原生 Wails/Go/React 发布包、notice、manifest 和 SHA-256。 -- `cmd/oneagent-rc`、`cmd/oneagent-provider-smoke`:发行候选的真实 Agent/Provider 检查。 +- `cmd/oneagent`:纯 Go headless CLI。 +- `cmd/oneagent-desktop`:Wails 桌面入口。 - `frontend/bindings`:Wails 生成物,禁止手工编辑。 +`cmd/oneagent-release`、`cmd/oneagent-rc`、`cmd/oneagent-provider-smoke` 已于 `23805b0` +移除,职责交给 `.github/workflows/build-artifacts.yml`。历史文档里提到它们的地方是背景, +不是可执行指南。 + 公开站已迁出到 [MaimoryLab/OneAgent-site](https://github.com/MaimoryLab/OneAgent-site),本仓库不再有 `site/`。它把 `agents.lock.json` 和 `providers.lock.json` vendor 到自己的 `data/` 下,从发行 tag 而不是本仓库 `main` 刷新——改这两个文件不会自动反映到站上,也不应该:站描述的是已发布版本支持什么。 `providers.lock.json` 是内置 Provider 端点、fallback model 和公开站商业披露字段的真源;用户 Provider 与内置覆盖保存在 `~/.oneagent/providers.json`。 @@ -34,20 +37,8 @@ pnpm run build pnpm run test:e2e ``` -构建和检查发行包: - -```bash -go run ./cmd/oneagent-release build --channel technical-preview-unsigned --source -go run ./cmd/oneagent-release check release -``` - -真实 RC 只在受控环境运行: - -```bash -go run ./cmd/oneagent-rc verify-agents -go run ./cmd/oneagent-rc adopted -go run ./cmd/oneagent-provider-smoke --provider all --timeout 30s -``` +每个 pull request 由 `.github/workflows/ci.yml` 跑上面这两组门。发行包由 +`.github/workflows/build-artifacts.yml` 手动触发构建。 普通测试、Wails 构建、站点构建和发布工具不需要 Python。安装 Aider 需要 Python 3.12,但不再要求本机预装:uv 自己解析解释器,本机有匹配版本就复用,否则下载一份托管 CPython 到 `~/.oneagent/runtimes/python`。Python 仍然不进发行包。 @@ -75,4 +66,6 @@ codegraph explore "binding Service Install" ## 文档维护 -README、workflow、Taskfile、Dockerfile 和 AI Agent Kit 里的命令必须对应当前仓库文件。历史 ADR 可以保留背景,但必须明确标记为 Superseded,不能作为操作指南。 +README、workflow、Taskfile 和 AI Agent Kit 里的命令必须对应当前仓库文件。历史 ADR 与已完成的计划文档可以保留背景,但必须明确标记状态,不能作为操作指南。 + +`LICENSE` 是 Apache-2.0,`NOTICE` 是第三方归属的真源。新增随包分发的依赖,或在界面里加入新的第三方标识时,必须同步 `NOTICE`——`docs/distribution-compliance-policy.md` 把它列为发布前置条件。 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a1ef034 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 MaimoryLab + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..c59c6ac --- /dev/null +++ b/NOTICE @@ -0,0 +1,66 @@ +OneAgent +Copyright 2026 MaimoryLab + +This product includes software developed at MaimoryLab. + +Licensed under the Apache License, Version 2.0. See LICENSE for the full text. + +================================================================================ +Third-party software redistributed in OneAgent binaries +================================================================================ + +The following components are compiled into, or bundled with, the OneAgent +desktop application and CLI. Their license texts are reproduced in the +directories named below, inside each dependency's own distribution. + +Go modules (linked into the binary) + + github.com/wailsapp/wails/v3 v3.0.0-beta.3 MIT + github.com/pelletier/go-toml/v2 v2.4.3 MIT + github.com/adrg/xdg v0.5.3 MIT + github.com/mattn/go-isatty v0.0.24 MIT + golang.org/x/sys v0.47.0 BSD-3-Clause + +JavaScript packages (bundled into the embedded frontend) + + react 19.2.8 MIT + react-dom 19.2.8 MIT + react-router-dom 7.18.1 MIT + lucide-react 1.25.0 ISC + @wailsio/runtime 3.0.0-alpha2.117 MIT + +================================================================================ +Third-party software downloaded at runtime, not redistributed +================================================================================ + +OneAgent does not bundle these. It downloads them from the official sources +recorded in runtimes.lock.json, into ~/.oneagent/runtimes, at the user's +request. They remain governed by their own licenses. + + Node.js MIT https://nodejs.org/dist/ + uv (astral-sh/uv) MIT OR Apache-2.0 https://github.com/astral-sh/uv/releases + +Agent packages are likewise installed from their official registries and are +never redistributed. Their licenses are recorded per entry in +agents.lock.json, and include one proprietary package +(@anthropic-ai/claude-code), which OneAgent installs only on the user's +explicit request. + +================================================================================ +Third-party trademarks +================================================================================ + +The application displays each supported Agent's own published mark so a user +can tell which tool a row refers to. This is nominative use: the marks +identify the referenced products and do not imply endorsement, affiliation or +sponsorship. They are not OneAgent product artwork, are not recoloured or +restyled, and remain the property of their respective owners. Provenance for +each file is recorded inline in +frontend/src/components/icons/agents.tsx. + +Marks included: Claude Code (Anthropic), Codex (OpenAI), Cursor (Anysphere), +Kilo CLI (Kilo Code), Aider, OpenCode, OpenClaw, Hermes (Nous Research). + +Two marks are redistributed under an open-source license rather than as +favicons: the OpenAI and OpenCode glyphs come from lobehub/icons-static-svg +(MIT), and the OpenClaw glyph from openclaw/openclaw (MIT). diff --git a/README.md b/README.md index 860ac2e..04fb92b 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,7 @@ vendor 到自己仓库,从发行 tag 刷新——所以改本仓库这两个 - `cmd/oneagent-desktop`:Wails 桌面入口。 - `cmd/oneagent`:纯 Go headless CLI。 -- `cmd/oneagent-release`:构建、notice、manifest、SHA-256 和发行包检查。 -- `cmd/oneagent-rc`:真实 Agent 安装和无密钥配置采用检查。 -- `cmd/oneagent-provider-smoke`:PPIO/Novita 三协议 RC smoke。 -- `internal/`:桌面、CLI 和 RC 工具共用的 Go 核心。 +- `internal/`:桌面和 CLI 共用的 Go 核心。 - `frontend/`:React 应用;发行包只携带构建后的静态资源。 - `agents.lock.json`:Agent 包名、来源、配置适配器和许可证的唯一清单;不固定 Agent 版本或包哈希。 - `providers.lock.json`:内置 Provider 端点、fallback probe model 和公开站披露字段清单;桌面端用户 Provider 保存在本机 `~/.oneagent/providers.json`。 @@ -122,49 +119,23 @@ pnpm run test:coverage pnpm run build pnpm exec playwright install chromium pnpm run test:e2e -cd .. -task test:native ``` - -## Release Candidate - -真实锁定 Agent 安装(默认四个 npm Agent,不包含可选 Aider): - -```bash -go build -o bin/oneagent ./cmd/oneagent -go run ./cmd/oneagent-rc verify-agents -go run ./cmd/oneagent-rc adopted -``` - -Provider 三协议 smoke 从受保护环境变量读取凭据和模型,不接受命令行 Key: - -```bash -ONEAGENT_PPIO_API_KEY=... \ -ONEAGENT_PPIO_OPENAI_MODEL=... \ -ONEAGENT_PPIO_ANTHROPIC_MODEL=... \ -ONEAGENT_PPIO_RESPONSES_MODEL=... \ -ONEAGENT_NOVITA_API_KEY=... \ -ONEAGENT_NOVITA_OPENAI_MODEL=... \ -ONEAGENT_NOVITA_ANTHROPIC_MODEL=... \ -ONEAGENT_NOVITA_RESPONSES_MODEL=... \ -go run ./cmd/oneagent-provider-smoke --provider all --timeout 30s -``` +每个 pull request 都会运行 `.github/workflows/ci.yml`:Go 侧是 `go vet` 加 +`go test -race`,前端侧是 `pnpm run test` 加 `pnpm run build`。 ## 发行 -在本机生成当前平台的未签名技术预览包: - -```bash -go run ./cmd/oneagent-release build \ - --channel technical-preview-unsigned \ - --source -go run ./cmd/oneagent-release check release -``` +发行包由 `.github/workflows/build-artifacts.yml` 构建,手动触发(`workflow_dispatch`)。 +它为 macOS 与 Windows 各构建 x64/arm64 的 Wails 桌面二进制和纯 Go CLI,macOS 产物打成 +`.app`。 -命令会构建 React、Wails 桌面二进制和纯 Go CLI,生成 macOS `.app` 或 Windows/Linux ZIP、可选源码 ZIP、第三方 notices、release manifest 和 SHA-256 清单。检查会拒绝 source map、远程资源、secret、Agent 二进制、语言运行时和无效目录信息。 +Wails 仍处于 Alpha,当前不发布 Stable,不做平台签名、公证或商店分发。Stable 的签名门禁 +保留在后续发行阶段。 -Wails 仍处于 Alpha,当前不发布 Stable,不做平台签名、公证或商店分发。Stable 的签名门禁保留在后续发行阶段。 +本机要复现一份等价产物,见「快速启动」里的桌面构建步骤;发行渠道标签、SHA-256 清单和 +第三方 notices 曾由 `cmd/oneagent-release` 生成,该工具已于 `23805b0` 随构建流程迁移到 +GitHub Actions 而移除。第三方归属现在维护在仓库根的 [NOTICE](NOTICE)。 ## 文档 @@ -176,3 +147,11 @@ Wails 仍处于 Alpha,当前不发布 Stable,不做平台签名、公证或 - [Wails 架构 ADR](docs/decisions/ADR-007-wails-v3-go-migration.md) - [按 Agent 协议验证 ADR](docs/decisions/ADR-004-per-agent-protocol-verification.md) - [历史 Python 发行 ADR(已废弃)](docs/decisions/ADR-003-three-platform-python-core-and-release-policy.md) + +## 许可证 + +Apache License 2.0,见 [LICENSE](LICENSE)。 + +[NOTICE](NOTICE) 列出随二进制分发的第三方组件及其许可证,以及运行时下载但不再分发的 +Node.js、uv 和 Agent 包。界面中显示的各 Agent 官方标识属于 nominative use,用于指明某一 +行对应哪个工具,不表示背书或关联,商标归各自所有者。 diff --git a/docs/agent-installer-target-versions.md b/docs/agent-installer-target-versions.md deleted file mode 100644 index 14f4636..0000000 --- a/docs/agent-installer-target-versions.md +++ /dev/null @@ -1,186 +0,0 @@ -# Agent 安装器目标版本 - -## 产品判断 - -安装路径就是增长入口。 - -开发者下载 Agent 时已经有明确意图。产品要做的不是重新教育用户,而是把这个意图转化为一个已配置的账号、一个可用的 API Key,以及第一次成功的模型调用。 - -## 版本 A:配置引导器 - -### 定位 - -最轻量的产品形态:帮助已经想使用某个 Agent 的开发者完成配置。 - -### 用户承诺 - -“运行一条命令,你的 Agent 就会配置到我们的模型服务。” - -### 核心功能 - -- Shell 安装器。 -- 手动粘贴 API Key。 -- 配置备份和恢复。 -- 一次测试请求。 -- 渠道归因。 -- 简单故障提示。 - -### 适合场景 - -- 快速验证。 -- 开发者社区传播。 -- README 分发。 -- 降低法律和维护风险。 - -### 成功指标 - -超过 40% 的安装器启动用户完成连通性测试。 - -## 版本 B:引导式安装器 - -### 定位 - -面向非专家开发者的完整安装体验。 - -### 用户承诺 - -“选择 Agent,登录账号,然后开始编码。” - -### 核心功能 - -- 网页引导式安装页。 -- 设备码或浏览器登录。 -- Agent 选择器。 -- 自动前置依赖检查。 -- 本地诊断报告。 -- 更好的错误恢复。 -- 基于同一安装核心的 macOS `.pkg` 或 `.dmg` 包装。 - -### 适合场景 - -- 付费投放。 -- 技术背景较弱的用户。 -- 降低客服成本。 -- 第一次使用 AI 编码工具的用户。 - -### 成功指标 - -超过 60% 的注册用户完成首次成功 Agent 请求。 - -## 版本 C:Agent Hub - -### 定位 - -类似应用商店的 Agent 和模型配置入口。 - -### 用户承诺 - -“在一个地方安装和管理所有编码 Agent。” - -### 核心功能 - -- 支持的 Agent 目录。 -- 按使用场景推荐模型配置。 -- 一键重装或修复。 -- 统一 API Key 管理。 -- 用量和费用视图。 -- 每个 Agent 的配置说明。 -- Agent 配置要求变化时的更新日志。 - -### 适合场景 - -- 用户尝试多个 Agent。 -- SEO 和内容增长。 -- 从单个 Agent 扩展到多个 Agent。 -- 推动模型套餐升级。 - -### 成功指标 - -超过 25% 的已激活用户安装或配置第二个 Agent。 - -## 版本 D:团队分发 - -### 定位 - -面向工程团队的管理员控制安装器。 - -### 用户承诺 - -“让每个工程师都用上正确模型、预算和策略下的 Agent。” - -### 核心功能 - -- 团队安装链接。 -- 预配置组织和默认模型。 -- 成员邀请流程。 -- 集中预算控制。 -- 模型白名单。 -- 统一账单。 -- 管理员可见的成员激活状态。 -- 可选 SSO。 - -### 适合场景 - -- 销售驱动的团队客户。 -- 内部开发者平台。 -- 想统一 AI 编码工具的公司。 - -### 成功指标 - -超过 70% 的受邀团队成员在 7 天内完成首次成功 Agent 请求。 - -## 版本 E:托管 Agent Runtime - -### 定位 - -最重的产品形态:我们的服务成为 Agent 执行的控制平面。 - -### 用户承诺 - -“不用管理供应商、Key 和路由,也能让每个 Agent 任务使用合适的模型。” - -### 核心功能 - -- 同时支持 OpenAI-compatible 和 Anthropic-compatible 的模型网关。 -- 按任务类型进行模型路由。 -- 策略控制。 -- 审计日志。 -- 在安全场景下做缓存。 -- 成本优化。 -- 失败兜底。 -- 组织级可观测性。 - -### 适合场景 - -- 企业客户。 -- 高频使用团队。 -- 从“安装工具”走向更深差异化。 - -### 成功指标 - -在保持质量的前提下,每个成功 Agent 任务的成本低于用户直接使用模型供应商。 - -## 推荐路径 - -1. 从版本 A 开始。 -2. 只加入版本 B 中能降低支持成本的部分:浏览器登录、诊断、修复流程。 -3. 如果自然出现团队邀请需求,再扩展到版本 D。 -4. 至少有三个稳定 Agent 集成后,再考虑版本 C。 -5. 把版本 E 当作独立产品赌注,不要塞进安装器里。 - -## 共同原则 - -- 除非有明确授权和强理由,否则不修改上游 Agent 包体。 -- 优先使用官方配置入口。 -- 优化目标是首次成功 Agent 请求,不是安装完成。 -- 本地密钥留在本地。 -- 修改配置前必须给出恢复路径。 -- 一次只新增一个 Agent。 - -## 避免事项 - -- 在一个 Agent 都没跑通前做应用商店。 -- 在个人激活链路没稳定前做企业控制台。 -- 做一个只包了一层 Shell 脚本、却不能提升完成率的桌面 App。 -- 进行用户看不到、也无法撤销的隐藏配置修改。 -- 在使用量证明需求前,提前做复杂模型路由。 diff --git a/docs/blank-machine-verification-plan.md b/docs/blank-machine-verification-plan.md index 96d1b68..4368b36 100644 --- a/docs/blank-machine-verification-plan.md +++ b/docs/blank-machine-verification-plan.md @@ -2,6 +2,10 @@ > 状态:已实施(2026-07-31)。实现入口已从历史脚本切换为 Go CLI、Go RC 命令和 shell cleanroom。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 验证层级 | 层级 | 入口 | 证明内容 | @@ -24,7 +28,7 @@ ## 运行 -```bash +```text go build -o bin/oneagent ./cmd/oneagent go run ./cmd/oneagent-rc verify-agents go run ./cmd/oneagent-rc adopted diff --git a/docs/cc-switch-reference-notes.md b/docs/cc-switch-reference-notes.md index a5c797c..7f1e8fb 100644 --- a/docs/cc-switch-reference-notes.md +++ b/docs/cc-switch-reference-notes.md @@ -76,7 +76,7 @@ CC Switch 依赖 **`@lobehub/icons-static-svg`**(MIT,723 个 AI 品牌 SVG 两个资产不能直接用,需换等价版本:`openai.com/favicon.svg` 与 `opencode.ai/favicon.svg` 都带 `:root` CSS 变量和 `prefers-color-scheme` 媒体查询,内联进宿主文档会污染全局样式;`aider.chat/assets/logo.svg` 是 200×60 的文字标加高斯模糊滤镜,不是方形图标。 -**OpenClaw 的标志是龙虾,不是螃蟹。** CC Switch 的手绘稿容易让人误解形象——这也是不该以它为准的另一个理由。 +**OpenClaw 的标志是龙虾,不是螃蟹。** 所以图标要以上游官方资产为准,不要以任何第三方项目的转绘为准——这一条对我们自己同样适用。 ### OpenClaw 与 Hermes 的图标不可取用 @@ -87,7 +87,7 @@ CC Switch 依赖 **`@lobehub/icons-static-svg`**(MIT,723 个 AI 品牌 SVG 两者都无法满足 24×24 单色 `currentColor` 的规范:渐变填充无法继承 `currentColor`,位图在 18px 渲染位与矢量字形并排时轻重不一。因此这两个按同一几何规范自绘,而不是取用 CC Switch 的资产。这不是许可问题(MIT 允许取用),是形态不兼容。 -**注意**:CC Switch 自己并未真的使用这个包——源码零引用,实际只在 `src/assets/icons/` 放了手工的 `chatgpt.svg` 与 `claude.svg`。这个依赖是装了没用,所以「它用了什么」不能作为可用性证据,必须自己核对。 +**注意**:这个包在 CC Switch 的源码里没有被引用,实际使用的是 `src/assets/icons/` 下手工的 `chatgpt.svg` 与 `claude.svg`。结论对我们有用的部分是方法论:「某个项目装了什么依赖」不能作为该依赖可用的证据,仍需自己核对。 **许可与商标**:MIT 覆盖 SVG 文件本身,不覆盖商标权。在自己 UI 内标示「这一行是哪个 Agent」属指示性使用;不得用作 OneAgent 的产品视觉资产。统一 `currentColor` 单色渲染,既统一风格也避免为第三方商标着色。 diff --git a/docs/config-chain-audit.md b/docs/config-chain-audit.md index d166958..d4597c6 100644 --- a/docs/config-chain-audit.md +++ b/docs/config-chain-audit.md @@ -2,6 +2,10 @@ > 更新:2026-07-31。历史审计发现已落实到 Go 核心;本文不再引用已删除的旧实现路径。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 当前链路 ```text @@ -32,7 +36,7 @@ Wails service or cmd/oneagent ## 审计门禁 -```bash +```text go test ./internal/config ./internal/install ./internal/app go run ./cmd/oneagent-rc adopted go run ./cmd/oneagent-release check release diff --git a/docs/decisions/ADR-003-three-platform-python-core-and-release-policy.md b/docs/decisions/ADR-003-three-platform-python-core-and-release-policy.md index 2ce076a..58f61e9 100644 --- a/docs/decisions/ADR-003-three-platform-python-core-and-release-policy.md +++ b/docs/decisions/ADR-003-three-platform-python-core-and-release-policy.md @@ -2,6 +2,10 @@ > 状态:**Superseded**(2026-07-31)。当前实现和发行规则由 [ADR-007](ADR-007-wails-v3-go-migration.md)、[ADR-005](ADR-005-channel-neutral-distribution-and-compliance.md) 和 `cmd/oneagent-release` 定义。本文件只保留历史背景,不是安装或发布操作指南。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 历史背景 早期 OneAgent 使用跨平台脚本和 Python 标准库实现 Agent catalog、配置适配、安装编排和本地 HTTP GUI。该方案曾强调三平台路径、权限、锁定版本、npm/uv allowlist、完整错误码和 cleanroom 证据。 diff --git a/docs/decisions/ADR-005-channel-neutral-distribution-and-compliance.md b/docs/decisions/ADR-005-channel-neutral-distribution-and-compliance.md index 2982d7c..f835c98 100644 --- a/docs/decisions/ADR-005-channel-neutral-distribution-and-compliance.md +++ b/docs/decisions/ADR-005-channel-neutral-distribution-and-compliance.md @@ -1,5 +1,9 @@ # ADR-005:渠道无关的二进制分发与合规门禁 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## Status Accepted diff --git a/docs/decisions/ADR-006-multi-profile-and-long-term-management.md b/docs/decisions/ADR-006-multi-profile-and-long-term-management.md index 486b6e4..b1654ae 100644 --- a/docs/decisions/ADR-006-multi-profile-and-long-term-management.md +++ b/docs/decisions/ADR-006-multi-profile-and-long-term-management.md @@ -2,7 +2,8 @@ ## Status -Implemented +Implemented,凭据投递部分已被 [ADR-008](ADR-008-credentials-in-agent-config-files.md) 取代 +(详见下方「修订」小节)。多 Profile 与长期管理的结论仍然有效。 ## Date diff --git a/docs/decisions/ADR-006-public-site-and-generated-release-index.md b/docs/decisions/ADR-009-public-site-and-generated-release-index.md similarity index 88% rename from docs/decisions/ADR-006-public-site-and-generated-release-index.md rename to docs/decisions/ADR-009-public-site-and-generated-release-index.md index b4b1901..917c2d5 100644 --- a/docs/decisions/ADR-006-public-site-and-generated-release-index.md +++ b/docs/decisions/ADR-009-public-site-and-generated-release-index.md @@ -1,11 +1,12 @@ -# ADR-006:独立公开站与 GitHub Release 事实源 +# ADR-009:独立公开站与 GitHub Release 事实源 - 状态:Partially Superseded(2026-08-04)——决策 1 中「在同一仓库维护」已被推翻,站点 迁出到 [MaimoryLab/OneAgent-site](https://github.com/MaimoryLab/OneAgent-site); 同一决策中「不把营销路由加入本地 Launcher」以及决策 2–5 仍然有效。决策 4 的读取路径 变为站点仓库 vendor 的 `data/` 副本,从发行 tag 刷新。当前操作指南见 [public-site-operations.md](../public-site-operations.md),本文件只作背景保留。 -- 日期:2026-07-28 +- 日期:2026-07-28(原编号 ADR-006,与《多 Profile 与长期环境管理》撞号,2026-08-04 改为 009; + ADR-008 的 Supersedes 指向的是那一份,不是本文) ## 背景 diff --git a/docs/distribution-compliance-policy.md b/docs/distribution-compliance-policy.md index 2d8b964..83cb944 100644 --- a/docs/distribution-compliance-policy.md +++ b/docs/distribution-compliance-policy.md @@ -27,7 +27,10 @@ OneAgent 默认不分发第三方 Agent 二进制。Agent 应通过官方安装 - OneAgent 二进制压缩包。 - 与压缩包对应的 SHA-256。 - 版本、构建时间、目标环境和发布状态。 -- `THIRD_PARTY_NOTICES` 或等价的第三方许可证清单。 +- 第三方许可证清单。当前由仓库根的 [NOTICE](../NOTICE) 承担;它同时区分随包分发的组件 + 与运行时下载、不再分发的组件(Node.js、uv、Agent 包)。生成这份清单的 + `cmd/oneagent-release` 已于 `23805b0` 移除,因此 `NOTICE` 现在是手工维护的真源,新增 + 随包依赖或界面第三方标识时必须同步。 - Agent 版本锁定清单和官方来源。 - 发行说明、已知问题和撤回联系方式。 diff --git a/docs/frontend-component-redesign-plan.md b/docs/frontend-component-redesign-plan.md index 5666706..f96a5b1 100644 --- a/docs/frontend-component-redesign-plan.md +++ b/docs/frontend-component-redesign-plan.md @@ -2,6 +2,10 @@ > 本文原为前端重构计划,现转为当前实现摘要。历史 PyInstaller、解释器测试和旧 HTTP 命令已删除。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 当前实现 - React 19 + TypeScript + Vite 构建 `frontend/dist`。 @@ -12,7 +16,7 @@ ## 本地门禁 -```bash +```text cd frontend pnpm install --frozen-lockfile pnpm run test:coverage diff --git a/docs/oneagent-concept-prompts.md b/docs/oneagent-concept-prompts.md deleted file mode 100644 index 7bbf5a7..0000000 --- a/docs/oneagent-concept-prompts.md +++ /dev/null @@ -1,191 +0,0 @@ -# OneAgent 概念图 Prompt 与生成记录 - -## 文档状态 - -- 生成日期:2026-07-21 -- 视觉阶段:已完成 -- 最终方向:`Native Utility Split View` -- 生成模型:`gpt-image-2` -- 图片用途:视觉方向与组件关系参考,不作为运行时位图或切图素材 - -本轮从零构建 Prompt,没有使用历史概念图作为输入、构图参考或 Prompt 来源。三个母版独立生成;七张页面图与三张组件状态图均以最终选定的 `master-a-native-utility.png` 为唯一输入图。 - -## 调用参数 - -### Image Generation - -```text -POST https://apiproxy.paigod.work/v1/images/generations -Content-Type: application/json - -model: gpt-image-2 -size: 1536x1024 -quality: high -output_format: png -n: 1 -``` - -### Image Edit - -```text -POST https://apiproxy.paigod.work/v1/images/edits -Content-Type: multipart/form-data - -model: gpt-image-2 -size: 1536x1024 # 页面图 -size: 1024x1024 # 组件状态图 -quality: high -output_format: png -n: 1 -image: master-a-native-utility.png -``` - -API Key 只从本机认证文件读取,仅进入请求头;没有写入 Prompt、命令、图片元数据或本文档。每张 PNG 相邻的 `.png.json` 文件保存实际 endpoint、模型、尺寸、Prompt、输入图和 usage,便于复核。 - -组件图请求尺寸为 `1024x1024`,接口原始返回文件实际为 `1254x1254`。交付前使用 macOS `sips` 做无裁切等比缩放,最终三张组件 PNG 均为 `1024x1024`;对应 sidecar 的 `postprocess` 字段保留原尺寸、原文件 SHA-256 和处理方式。 - -## 母版公共 Prompt - -以下公共 Prompt 与一个方向增量拼接,组成三个母版的完整请求。 - -```text -Create a coherent high-fidelity desktop application UI concept for OneAgent, a local-first utility that activates a usable AI development environment. This must be an actual software interface, not a marketing page, poster, dashboard collage, device mockup, browser page, or explanatory diagram. - -Canvas and shell: 1536x1024 landscape. Center one application window approximately 1392x900 with balanced outer margin. Use a 52px title bar, a restrained desktop window frame, and a stable 64px bottom action area. Show no browser address bar and no physical device. The interface should occupy at least 90 percent of the image. - -Design philosophy: macOS-inspired but original, guided by safety, predictability, understanding, achievement, familiarity, simplicity, craft, and immediate feedback. Use a translucent pale-gray navigation material, white workspace, graphite typography, thin neutral separators, subtle physical depth, precise alignment, restrained shadow, system-blue #007AFF for the single primary action, semantic green #34C759 only for successful states, warning orange #FF9F0A only when necessary. Use modest 6px to 8px radii. No large pill containers, no card-heavy SaaS dashboard, no gradients, no decorative blobs, no illustrations. - -Component language: compact list rows instead of promotional cards, familiar checkboxes and segmented controls, clear selected state, visible keyboard focus, progressive disclosure, one obvious primary action, stable Back and Continue placement. Use neutral category glyphs rather than copied or invented brand logos. - -Text budget: render only these short labels when needed and no other sentences: “OneAgent”, “激活环境”, “总览”, “Agent”, “Provider”, “配置档案”, “继续”. Keep text below 10 percent of the visual area. No annotations or design callouts. - -Hard constraints: no Apple logo, no copied Apple application, no browser chrome, no Windows paths, no Docker, no Ollama, no fake API keys, no unrelated products, no terminal dominating the screen, no marketing hero, no oversized headings, no dense paragraphs, no nested cards, no watermark. -``` - -### Direction A:Native Utility Split View - -```text -Direction A — Native Utility Split View. Use a 232px translucent left sidebar with OneAgent at the top and compact navigation rows. The main workspace is a continuous setup surface with a quiet page heading, a five-step progress indicator, three compact agent selection rows, and a fixed bottom action area. Do not use a permanent right inspector. The composition should feel like a calm native system utility that can scale across seven setup pages. -``` - -输出:[`master-a-native-utility.png`](../output/imagegen/react-apple-v1/master-a-native-utility.png) - -### Direction B:Focused Setup Assistant - -```text -Direction B — Focused Setup Assistant. Keep the same outer application window and title bar, but replace the full navigation sidebar with a narrow 176px setup progress column. The main workspace centers one task at a time with generous negative space, a small selection summary, and a stable bottom action area. Make the experience feel like a trustworthy first-run setup assistant rather than a long-term dashboard. It must still be practical for dense Agent and Provider steps. -``` - -输出:[`master-b-setup-assistant.png`](../output/imagegen/react-apple-v1/master-b-setup-assistant.png) - -### Direction C:Professional Workspace - -```text -Direction C — Professional Workspace. Use a 220px translucent navigation sidebar, a wide central setup workspace, and a restrained 288px contextual inspector on the right. The inspector shows only compact local readiness status and a privacy state, never a large terminal. The central workspace contains list-based setup controls and one blue primary action. The composition should feel like a professional developer utility while remaining quiet and approachable. -``` - -输出:[`master-c-professional-workspace.png`](../output/imagegen/react-apple-v1/master-c-professional-workspace.png) - -## 页面编辑公共 Prompt - -七张页面图都使用母版 A 作为输入,并将以下公共 Prompt 与对应页面增量拼接。 - -```text -Edit the input image. Preserve exactly the application window position, 52px title bar, 232px translucent sidebar, sidebar navigation order, window shadow, white main workspace, system-blue #007AFF, semantic green #34C759, graphite typography, thin separators, five-step progress geometry, and fixed 64px bottom action area. Keep the same camera angle and overall visual density. Change ONLY the main workspace content and the active setup step. Use compact native list rows and familiar controls. Render only the explicitly listed short labels and no other sentences. Do not add browser chrome, device hardware, Apple logo, copied product UI, fake Agent logos, marketing content, decorative graphics, gradients, large cards, unrelated software, terminal-first layout, Windows paths, Docker, or Ollama. -``` - -### Page 1:选择 Agent - -```text -Create the Agent selection page. Active step is 1. Heading: “选择 Agent”. Show a compact section “常用” with exactly three multi-select rows: “Codex”, “Claude Code”, “OpenCode”. Codex and OpenCode are selected and marked “已安装”; Claude Code is selected and marked “待安装”. Below them show one collapsed disclosure row “更多分类” without listing every Agent. Use neutral coding glyphs, real checkboxes, subtle installed status, and one clear blue “继续” button. Allowed text only: 选择 Agent, 常用, Codex, Claude Code, OpenCode, 已安装, 待安装, 更多分类, 继续. -``` - -输出:[`page-1-agent-selection.png`](../output/imagegen/react-apple-v1/page-1-agent-selection.png) - -### Page 2:配置方式 - -```text -Create the configuration mode page. Active step is 2. Heading: “配置方式”. Show exactly two full-width native choice rows, not large cards. The first row “配置模型服务” is selected with a blue radio indicator and a small provider glyph. The second row “使用已有账号” is unselected with a person-and-key glyph. Add a compact privacy line “密钥仅保存在本机” near the selected option. Keep one clear blue “继续” button. Allowed text only: 配置方式, 配置模型服务, 使用已有账号, 密钥仅保存在本机, 继续. -``` - -输出:[`page-2-config-mode.png`](../output/imagegen/react-apple-v1/page-2-config-mode.png) - -### Page 3:Provider 与 Key - -```text -Create the Provider and API Key page. Active step is 3. Heading: “连接模型服务”. At the top of the main workspace use a restrained segmented control with “PPIO”, “Novita”, “自定义”; PPIO is selected. Below show one secure API Key field with masked dots and a compact privacy lock icon. Place a secondary “测试连接” button beside the field and show a small green inline state “已连接” after a successful test. Keep the custom base URL field hidden because PPIO is selected. Add one quiet external-link icon for registration without explanatory copy. Use one clear blue “继续” button. Allowed text only: 连接模型服务, PPIO, Novita, 自定义, API Key, 测试连接, 已连接, 继续. -``` - -输出:[`page-3-provider-key.png`](../output/imagegen/react-apple-v1/page-3-provider-key.png) - -### Page 4:模型选择 - -```text -Create the model selection page. Active step is 4. Heading: “选择模型”. Show a compact search or model input at the top with a small secondary command “刷新列表”. Under it show one selected native list row “deepseek-v3” with a green available indicator, followed by one quiet disclosure row “手动输入”. Keep the layout sparse but not empty, with the controls aligned to the same content grid as previous pages. Use one clear blue “继续” button. Allowed text only: 选择模型, 刷新列表, deepseek-v3, 可用, 手动输入, 继续. -``` - -输出:[`page-4-model-selection.png`](../output/imagegen/react-apple-v1/page-4-model-selection.png) - -### Page 5:确认激活 - -```text -Create the final review page. Active step is 5. Heading: “确认激活”. Use one continuous grouped list, not a table and not metric cards. Show four review rows: “Agent” with value “3 项”; “Provider” with value “PPIO”; “模型” with value “deepseek-v3”; “备份” with value “自动备份”. Each row has a quiet edit chevron. Add one small green readiness state “准备就绪”. Replace the blue Continue button with the primary command “开始激活”. Allowed text only: 确认激活, Agent, 3 项, Provider, PPIO, 模型, deepseek-v3, 备份, 自动备份, 准备就绪, 开始激活. -``` - -输出:[`page-5-review.png`](../output/imagegen/react-apple-v1/page-5-review.png) - -### Page 6:执行结果 - -```text -Create the activation execution and result page. Replace the five-step progress control with a compact completion state while preserving its location. Heading: “正在激活”. Show exactly three horizontal progress rows: “Codex”, “Claude Code”, “OpenCode”. Codex and OpenCode are “已完成”; Claude Code shows one recoverable failed state with a quiet “重试” command. Beneath the rows place a collapsed “查看日志” disclosure, not an open terminal. The primary blue button is “进入总览”. Keep the failure visually restrained and actionable. Allowed text only: 正在激活, Codex, Claude Code, OpenCode, 已完成, 重试, 查看日志, 进入总览. -``` - -输出:[`page-6-activation-result.png`](../output/imagegen/react-apple-v1/page-6-activation-result.png) - -### Page 7:环境总览 - -```text -Create the activated environment overview page. Remove the five-step progress indicator while preserving the header spacing and application shell. Heading: “开发环境已就绪”. Show one calm success symbol beside the heading. Use a continuous summary list with three rows: “Provider” value “PPIO”; “模型” value “deepseek-v3”; “Agent” value “3 项”. Below add a compact first-request state “首次请求” and green “已通过”. Provide one blue primary command “运行测试” and one quiet secondary command “重新配置”. Keep the page useful as the long-term home screen, not a success marketing page. Allowed text only: 开发环境已就绪, Provider, PPIO, 模型, deepseek-v3, Agent, 3 项, 首次请求, 已通过, 运行测试, 重新配置. -``` - -输出:[`page-7-environment-overview.png`](../output/imagegen/react-apple-v1/page-7-environment-overview.png) - -## 组件状态公共 Prompt - -三张组件图同样以母版 A 为输入,使用以下公共 Prompt 与各自增量。 - -```text -Edit the input image into a square 1024x1024 component-state study for the same OneAgent interface. Preserve the exact visual language from the source: off-white background, white surfaces, graphite typography, #007AFF selection and focus, #34C759 success, #FF9F0A warning, restrained red error, 6px to 8px radii, thin separators, compact native list rows, neutral line icons, and precise spacing. Remove the full application shell and show one centered component panel occupying at least 88 percent of the canvas. This is a UI component sheet, not an annotated design document: no arrows, measurements, paragraphs, browser chrome, device frame, Apple logo, fake brand logos, marketing graphics, gradients, nested cards, or watermark. Render only the explicitly allowed labels. -``` - -### Agent 行状态 - -```text -Show six vertically stacked variants of the same AgentRow component using “Codex” as the stable item name: default, hover, selected, installed, pending install, and guide-only. Use real checkbox geometry, a neutral coding glyph, stable row height, right-aligned status, and visible keyboard focus on one row. Allowed labels only: Agent 状态, Codex, 默认, 悬停, 已选择, 已安装, 待安装, 仅引导. -``` - -输出:[`components-agent-row-states.png`](../output/imagegen/react-apple-v1/components-agent-row-states.png) - -### Key 与连接状态 - -```text -Show six vertically stacked SecureKeyField and ConnectionStatus variants: empty, masked value, testing with spinner, connected success, rejected credential, endpoint error. Keep the field width and button placement identical in every row. Use a lock icon, masked dots, inline status, and restrained validation colors. Allowed labels only: API Key, 未填写, 测试中, 已连接, Key 被拒绝, 端点错误, 测试连接. -``` - -输出:[`components-key-connection-states.png`](../output/imagegen/react-apple-v1/components-key-connection-states.png) - -### 安装执行状态 - -```text -Show six vertically stacked AgentProgressRow variants using the stable names Codex, Claude Code, and OpenCode across the examples: waiting, installing, configuring, completed, failed with retry, and a collapsed log disclosure. Use compact progress indicators and keep failures recoverable rather than alarming. Allowed labels only: 执行状态, Codex, Claude Code, OpenCode, 等待, 安装中, 配置中, 已完成, 失败, 重试, 查看日志. -``` - -输出:[`components-activation-states.png`](../output/imagegen/react-apple-v1/components-activation-states.png) - -## Prompt 使用规则 - -- 后续修图只允许使用母版 A 或以上述母版派生的同页图片,不混合 B、C 的布局语言。 -- 页面编辑只改变主工作区和当前步骤;窗口、侧栏、标题栏、步骤条位置与底部操作区保持稳定。 -- 生图中的文字只用于验证信息密度。真实产品文字、焦点、错误语义和动态数据由 React 组件重建。 -- 同一页面最多进行两次布局修订;若只是错字,不继续消耗生成次数。 -- 概念图不得直接进入产品资源目录,也不得作为 CSS 背景或运行时截图。 diff --git a/docs/oneagent-concept-review.md b/docs/oneagent-concept-review.md deleted file mode 100644 index bd4da28..0000000 --- a/docs/oneagent-concept-review.md +++ /dev/null @@ -1,156 +0,0 @@ -# OneAgent 概念图审查与 React 修正清单 - -## 结论 - -本轮选择 **Direction A:Native Utility Split View** 作为唯一视觉方向。它最符合 OneAgent“激活一个真正可用的 AI 开发环境”的产品定位,也最容易稳定扩展为多步骤向导和激活后的长期总览。 - -![选定母版](../output/imagegen/react-apple-v1/master-a-native-utility.png) - -概念阶段交付已经齐全:3 张母版、7 张连续页面图、3 张组件状态图。图片负责确定外壳、层级、密度和组件关系;真实文字、动态状态、隐私保护、键盘交互和响应式行为必须由 React 实现,不从图片中切图复刻。 - -三张组件图的接口请求尺寸为 `1024x1024`,原始响应实际为 `1254x1254`;交付文件已做无裁切等比缩放到 `1024x1024`。该处理只统一尺寸,不改变构图,并已写入相邻元数据。 - -## 母版评分 - -| 方向 | 产品定位 20 | Apple 原则 20 | 组件扩展 20 | UI/文字 15 | 连续页面 15 | React 可行性 10 | 总分 | -|---|---:|---:|---:|---:|---:|---:|---:| -| A. Native Utility Split View | 20 | 19 | 20 | 15 | 13 | 8 | **95** | -| B. Focused Setup Assistant | 17 | 18 | 15 | 14 | 8 | 6 | **78** | -| C. Professional Workspace | 16 | 13 | 16 | 11 | 10 | 6 | **72** | - -### 选择 A 的原因 - -- 232px 侧栏、连续主工作区和固定底部操作区构成稳定外壳,七个页面不需要重排骨架。 -- 主要信息使用原生感列表行,不依赖营销卡片、插画或复杂素材。 -- 单一蓝色主操作、克制的成功色和明确的返回路径符合安全、可预测和熟悉的交互原则。 -- 主工作区可以承载 Agent 高密度列表,也能自然收敛为 Provider 表单、确认清单和结果状态。 -- 无常驻终端或右侧检查器,主任务不会被技术细节抢占。 - -### 淘汰 B 的原因 - -- 纵向设置进度与长期导航职责混合,激活完成后难以自然转为环境管理界面。 -- 中央区域负空间偏大,Agent 目录、错误恢复和多结果状态会变得松散。 -- 页面数量增加后,窄进度列会承担过多导航和状态语义。 - -### 淘汰 C 的原因 - -- 右侧检查器诱导出 CPU、GPU、数据目录等不属于当前产品边界的信息。 -- 背景和三栏布局增加装饰与实现成本,在 1024px 宽度下会明显压缩核心表单。 -- 更像通用开发工作台,而不是聚焦的环境激活器。 - -## 跨页面连续性审查 - -七张页面图保持了同一窗口位置、标题栏、侧栏宽度、导航顺序、五步进度几何、列表语言和底部操作区。流程从“选择 Agent”进入“确认激活”,再从执行结果进入长期总览,没有出现重新定义产品外壳的跳变。 - -| 页面 | 概念图保留项 | React 必须修正或补齐 | -|---|---|---| -| 选择 Agent | 常用 Agent 优先、列表多选、状态右对齐、更多分类渐进披露 | 从真实 catalog 渲染全部分类;补齐 guide-only、禁用、加载、空目录和键盘多选状态 | -| 配置方式 | 两个连续选择行;“配置模型服务”与“使用已有账号”同级 | 跳过配置后显式标记步骤 3、4 为已跳过;不能把跳过解释为失败或不完整 | -| Provider 与 Key | 分段控件、单一安全输入、连接状态内联、注册入口低干扰 | Custom 时显示 Base URL;API Key 不进入 reducer、URL、日志或持久化;错误信息不能只靠颜色 | -| 模型选择 | 搜索/刷新、单选模型行、手动输入作为回退 | 模型列表可为空;401/403、404/405、网络错误分别呈现;默认模型必须来自响应或显式回退规则 | -| 确认激活 | 使用分组行而非表格;清楚展示 Agent、Provider、模型和备份 | 增加将写入的实际路径、guide-only 项、安装策略与编辑返回入口;Key 永不出现在确认页 | -| 执行结果 | 每个 Agent 独立结果、失败可恢复、日志默认折叠 | 当前 API 不提供实时百分比,禁止伪造 35%/60%;V1 使用不定进度,响应返回后切换最终状态 | -| 环境总览 | Provider、模型、Agent、首次请求形成长期状态主页 | 数据全部来自 `/api/status` 和运行结果;“运行测试”必须有真实请求与失败状态,不能只是成功装饰 | - -## 组件状态审查 - -### AgentRow - -[`components-agent-row-states.png`](../output/imagegen/react-apple-v1/components-agent-row-states.png) 已验证同一行高可以容纳默认、悬停、选中、已安装、待安装和仅引导状态。真实组件需要: - -- 使用原生 checkbox 语义或等价的可访问复选控件。 -- 行点击与 checkbox 点击行为一致,不产生双重切换。 -- 状态由图标、文本和颜色共同表达。 -- guide-only 仍可选择,但确认页必须明确它只提供引导,不会自动写配置。 -- neutral glyph 由 Lucide 图标实现,不复制或伪造 Agent 品牌 Logo。 - -### SecureKeyField / ConnectionStatus - -[`components-key-connection-states.png`](../output/imagegen/react-apple-v1/components-key-connection-states.png) 已验证输入、按钮和内联状态可以保持稳定宽度。真实组件需要: - -- 空值、输入、测试中、成功、Key 被拒绝、端点错误六种状态使用同一布局槽位,避免按钮和字段跳动。 -- 401/403 映射为“端点可达,但 Key 被拒绝”;不能误报为 URL 错误。 -- 密钥默认遮罩,显示切换有可访问名称;离开流程或完成安装后清空内存引用。 -- 不在 React DevTools 可序列化 reducer、`localStorage`、`sessionStorage`、日志、错误追踪或 DOM 文本中保存密钥。 - -### AgentProgressRow / LogDisclosure - -[`components-activation-states.png`](../output/imagegen/react-apple-v1/components-activation-states.png) 已验证等待、安装中、配置中、成功、失败、重试和日志折叠能够共享一套行组件。真实组件需要: - -- 在没有后端进度事件时使用不定进度,不显示虚构百分比。 -- `failed` 状态保留错误摘要和针对单个 Agent 的重试操作。 -- 日志默认折叠,展开后使用等宽字体和可复制文本;日志内容再次执行密钥脱敏。 -- 动态状态通过 `aria-live="polite"` 通知,不抢夺当前键盘焦点。 - -## 视觉系统定稿 - -### 颜色与材质 - -| Token | 值 | 用途 | -|---|---|---| -| `--color-canvas` | `#F5F5F7` | 页面外部背景 | -| `--color-surface` | `#FFFFFF` | 主工作区和控件表面 | -| `--color-sidebar` | `rgba(246, 246, 248, .86)` | 侧栏材质 | -| `--color-text-primary` | `#1D1D1F` | 主文字 | -| `--color-text-secondary` | `#6E6E73` | 次级文字 | -| `--color-accent` | `#007AFF` | 唯一主操作、选择和焦点 | -| `--color-success` | `#34C759` | 成功与可用状态 | -| `--color-warning` | `#FF9F0A` | 待处理与温和警告 | -| `--color-danger` | `#FF3B30` | 失败和破坏性状态 | -| `--color-separator` | `rgba(60, 60, 67, .18)` | 分隔线与边框 | - -半透明侧栏只作为层级增强。浏览器不支持 `backdrop-filter` 时必须退化为不透明浅灰,不能依赖模糊保证可读性。 - -### 尺寸与排版 - -- 标题栏:52px;底部操作区:64px。 -- 侧栏:宽屏 232px;1024–1279px 使用 184px 紧凑侧栏。 -- 普通列表行:56px;包含说明的选择行:64px;控件高度:32px 或 36px。 -- 页面内容最大宽度:880px;正文不横跨整个工作区。 -- 圆角:控件 6px、列表组 8px、外壳 12px。 -- 字体:`-apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", sans-serif`;字距 `0`。 -- 页面标题保持工具级字号,不使用 Hero 级排版。 - -### 动效 - -- 按下反馈约 100ms;页面状态过渡约 220ms。 -- 只为状态关系和层级变化提供动效,不为装饰而动。 -- 所有过渡可中断,不锁定输入;`prefers-reduced-motion` 下关闭位移和旋转,仅保留即时状态切换。 - -## 响应式映射 - -### 1440×900 - -- 外壳四周保留 16px 左右边距,完整显示 232px 侧栏和固定底部操作区。 -- 主工作区内容列不超过 880px,剩余空间作为安静留白,不引入右侧面板填空。 - -### 1280×800 - -- 外壳边距收敛到 12px;侧栏仍保持 232px。 -- 页面顶部和列表间距按紧凑 token 收缩,底部操作区保持固定,不覆盖滚动内容。 - -### 1024×720 - -- 外壳近似贴边,移除大阴影;侧栏缩为 184px。 -- 主工作区独立滚动,标题栏与底部操作区保持固定。 -- Stepper 缩短连接线但保留五个步骤语义;长状态文字换行或截断并提供完整可访问名称。 -- 不出现横向滚动,不加入临时右侧检查器。 - -## 实现可行性与边界 - -概念中的主要效果都可由 React 和 CSS 实现:列表行、分段控件、步骤条、固定底栏、半透明侧栏、轻阴影和折叠日志不依赖位图或 Canvas。需要明确约束的部分如下: - -- 真实产品仍由本地浏览器承载;概念图去除浏览器地址栏只是为了隔离产品视觉,不代表已经成为原生 macOS 应用。 -- 不复刻 macOS 受保护资产,不使用 Apple Logo;窗口交通灯只属于概念构图,浏览器版可移除或改为中性装饰。 -- 不为追求“原生感”引入复杂 WebGL、背景图或高成本滤镜。 -- 侧栏只显示已有可用页面。没有对应功能的导航项不应作为可点击死入口进入首版。 -- 当前同步 `/api/install` 只能提供请求级加载和最终结果。若未来需要逐 Agent 实时进度,必须先设计异步 job/SSE 合约,不能只在前端模拟。 - -## React 验收重点 - -- 七个页面共享同一 `AppWindow`、`NavigationSidebar`、`SetupStepper` 和 `SetupFooter`。 -- 所有动态文字均为真实 DOM 文本,图标来自统一组件库,概念 PNG 不进入运行时资源。 -- 完整配置路径、跳过配置路径、模型列表失败回退和单 Agent 重试都可操作。 -- 1440×900、1280×800、1024×720 无横向溢出、遮挡或操作区跳动。 -- 键盘可完成多选、分段切换、密钥输入、模型选择、确认和日志展开。 -- 页面文本、日志、测试输出和序列化状态中不出现 API Key。 diff --git a/docs/per-agent-config-plan.md b/docs/per-agent-config-plan.md index 777cd64..897fc65 100644 --- a/docs/per-agent-config-plan.md +++ b/docs/per-agent-config-plan.md @@ -2,6 +2,10 @@ > 当前实现位于 `internal/config` 和 `internal/app`。本文保留设计结论,旧脚本路径不再适用。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 适配器 | Agent | 配置适配器 | 凭据交付 | @@ -19,7 +23,7 @@ ## 验收 -```bash +```text go test ./internal/config ./internal/app bash tests/install_test.sh go run ./cmd/oneagent-rc adopted diff --git a/docs/provider-rc-testing.md b/docs/provider-rc-testing.md index d80b8bd..113231f 100644 --- a/docs/provider-rc-testing.md +++ b/docs/provider-rc-testing.md @@ -1,5 +1,14 @@ # Provider RC 测试说明 +> 状态:**协议要求仍然有效,执行入口已不存在**(2026-08-04)。 +> +> 本文描述的三协议槽位、凭据处理和判定口径仍是 Provider 接入的要求。但执行它的 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 随构建流程迁移而移除,本文的命令 +> **无法运行**。恢复自动化前,正式 RC 需按下面的口径手工执行。 +> +> 本文引用的 `.github/workflows/release-candidate.yml` 同样不存在;当前仓库只有 +> `ci.yml` 和 `build-artifacts.yml`。 + ## 测试层级 OneAgent 将 Provider 测试分为两个层级: @@ -32,13 +41,13 @@ ONEAGENT__RESPONSES_MODEL ## 本地执行 -```bash +```text go run ./cmd/oneagent-provider-smoke --provider ppio --timeout 30s ``` 命令只从环境变量读取 Key 和模型,不接受命令行凭据,也不会把响应正文写入日志。正式 RC: -```bash +```text go run ./cmd/oneagent-provider-smoke --provider all --timeout 30s ``` diff --git a/docs/public-site-operations.md b/docs/public-site-operations.md index da52ea6..6c3ba05 100644 --- a/docs/public-site-operations.md +++ b/docs/public-site-operations.md @@ -34,6 +34,6 @@ GitHub Release 不替代产物验证。 ## 历史背景 设计决策记录在 -[ADR-006](decisions/ADR-006-public-site-and-generated-release-index.md)。该 ADR 中 +[ADR-009](decisions/ADR-009-public-site-and-generated-release-index.md)。该 ADR 中 「在同一仓库维护 `site/`」的部分已被本次拆分取代;不把营销路由加入本地 Launcher 的 结论仍然有效。 diff --git a/docs/recent-work-summary.md b/docs/recent-work-summary.md index 806976f..a864b01 100644 --- a/docs/recent-work-summary.md +++ b/docs/recent-work-summary.md @@ -2,6 +2,10 @@ > 更新:2026-07-31。本文记录当前可复核的 Go/Wails 收尾结果;旧的 Python 计数和命令不再是验收依据。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 已完成 - Go backend 覆盖 catalog、Provider、安装、配置发现/写入、profile、secret、备份、权限和 CLI。 @@ -14,7 +18,7 @@ ## 当前验证入口 -```bash +```text go test ./... go test -race ./... bash tests/install_test.sh diff --git a/docs/release-evidence/0.2.0-dev-macos-arm64.md b/docs/release-evidence/0.2.0-dev-macos-arm64.md index 568b55c..8b90f17 100644 --- a/docs/release-evidence/0.2.0-dev-macos-arm64.md +++ b/docs/release-evidence/0.2.0-dev-macos-arm64.md @@ -2,6 +2,10 @@ > 历史记录:该包来自迁移前的预览流程,不代表当前发行实现。当前包由 `cmd/oneagent-release` 生成;本文件仅保留旧 SHA-256 以便审计。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + 状态:`technical-preview-unsigned`,不是 Stable。 - 构建平台:macOS arm64 diff --git a/docs/wails-v3-migration-plan.md b/docs/wails-v3-migration-plan.md index 0198b66..5b7ba30 100644 --- a/docs/wails-v3-migration-plan.md +++ b/docs/wails-v3-migration-plan.md @@ -4,6 +4,10 @@ > > 本文是收尾验收记录。当前生产实现是 Go + Wails + React;旧脚本和旧测试已删除。Wails 仍为 Alpha,所以发行渠道保持 `technical-preview-unsigned`。 +> 补注(2026-08-04):本文提到的 `cmd/oneagent-release`、`cmd/oneagent-rc`、 +> `cmd/oneagent-provider-smoke` 已于 `23805b0` 移除,职责交给 +> `.github/workflows/build-artifacts.yml`。相关命令是历史背景,不可执行。 + ## 1. 目标与边界 - 桌面应用使用 Wails v3,React 只调用生成的 TypeScript bindings。 @@ -84,7 +88,7 @@ site/ independent Astro release site ## 5. 验收命令 -```bash +```text go vet ./... go test ./... go test -race ./... @@ -104,7 +108,7 @@ go run ./cmd/oneagent-release check release 发行候选在受保护环境执行: -```bash +```text go run ./cmd/oneagent-rc verify-agents go run ./cmd/oneagent-rc adopted go run ./cmd/oneagent-provider-smoke --provider all --timeout 30s diff --git a/frontend/dist/.keep b/frontend/dist/.keep new file mode 100644 index 0000000..e69de29 diff --git a/frontend/package.json b/frontend/package.json index 923bf81..59b559b 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,6 +2,7 @@ "name": "oneagent-frontend", "private": true, "version": "0.2.0-dev", + "license": "Apache-2.0", "type": "module", "packageManager": "pnpm@11.17.0", "scripts": {