diff --git a/.gitignore b/.gitignore index 5cd09fd6..7c5ee850 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ site/ # 本机代码索引。是否建立索引由每个开发者自己决定,重建只需 `codegraph index .` .codegraph/ + +# 对竞品的定向调研笔记:含内部评价措辞,保留本机参考但不随开源仓库分发。 +docs/internal/cc-switch-reference-notes.md diff --git a/NOTICE b/NOTICE index 929aa75b..393af171 100644 --- a/NOTICE +++ b/NOTICE @@ -49,8 +49,19 @@ redistribute it. The four retained image assets, for Codex, Claude Code, OpenCode, and Kilo CLI, are listed with source, license, owner, and SHA-256 in frontend/src/components/icons/asset-rights.json. -This is nominative use: the labels identify the referenced products and do not -imply endorsement, affiliation or sponsorship. The image assets keep their -published geometry and are not re-drawn. Each is distributed as a single-colour -glyph painted with fill="currentColor", so it takes the surrounding text colour -by design rather than carrying a brand colour that is being altered. +The Agent marks described above are nominative use: the labels identify the +referenced products and do not imply endorsement, affiliation or sponsorship. +The image assets keep their published geometry and are not re-drawn. Each is +distributed as a single-colour glyph painted with fill="currentColor", so it +takes the surrounding text colour by design rather than carrying a brand colour +that is being altered. + +Sponsor marks are a separate case and are not nominative use. The PPIO and +Novita logos under docs/assets/sponsors/ are reproduced with each owner's +permission to identify a sponsor of this project, and they do carry their brand +colours as published. They appear only in README.md and README_ZH.md, never in +the application interface, and are listed with source, owner, and SHA-256 in +docs/assets/sponsors/asset-rights.json. Each logo remains the property of its +owner. Sponsorship does not affect Agent rank, compatibility conclusions, +default selection, or connection tests; the commercial relationship for each +Provider is declared in providers.lock.json. diff --git a/README.md b/README.md index c59a60d0..133e87c7 100644 --- a/README.md +++ b/README.md @@ -208,6 +208,23 @@ maintainer-facing and stays in Chinese. past work. Commands in there may have stopped working as tools were removed; that directory's README names the current entry points. +## Sponsors + +OneAgent's development is supported by: + +

+ PPIO +    + Novita +

+ +Both are also built-in Providers in OneAgent. Sponsorship does not change which +Provider is recommended or how one is verified: every Provider is probed against +the protocol its Agent actually speaks, and the built-in list is ordered in +`providers.lock.json` independently of any commercial relationship. See +[providers.lock.json](providers.lock.json) for each entry's declared +relationship and disclosure. + ## Licence Apache License 2.0. See [LICENSE](LICENSE). diff --git a/README_ZH.md b/README_ZH.md index 13244fa8..ad0ebef0 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -154,6 +154,21 @@ Wails 仍处于 Alpha,当前不发布 Stable,不做平台签名、公证或 - [internal/](docs/internal/README.md):各次改造的完工记录与验证清单。里面的命令可能已随工具移除而失效,该目录的 README 说明了当前的替代入口。 +## 赞助 + +OneAgent 的开发由以下机构支持: + +

+ PPIO +    + Novita +

+ +两者同时也是 OneAgent 的内置 Provider。赞助关系不改变推荐哪个 Provider、也不改变 +如何验证它:每个 Provider 都按其 Agent 实际使用的协议探测,内置列表的顺序在 +`providers.lock.json` 里独立定义,与商业关系无关。各条目声明的关系与披露见 +[providers.lock.json](providers.lock.json)。 + ## 许可证 Apache License 2.0,见 [LICENSE](LICENSE)。 diff --git a/docs/assets/sponsors/asset-rights.json b/docs/assets/sponsors/asset-rights.json new file mode 100644 index 00000000..028c3b62 --- /dev/null +++ b/docs/assets/sponsors/asset-rights.json @@ -0,0 +1,21 @@ +{ + "note": "Sponsor logos reproduced with the owner's permission to identify a sponsor of this project. Unlike the Agent marks in frontend/src/components/icons/asset-rights.json, these are not nominative use and they keep their published brand colours. They appear only in README.md and README_ZH.md, never in the application interface, and are not compiled into any release binary.", + "assets": { + "ppio": { + "file": "ppio-color.png", + "owner": "PPIO", + "home": "https://ppio.com/", + "basis": "permission-from-owner", + "usage": "readme-only", + "sha256": "de34cd65b95756a7438feef7731e3f661cb16ed896750e2db74c4adb17bfa875" + }, + "novita": { + "file": "novita-color.png", + "owner": "Novita", + "home": "https://novita.ai/", + "basis": "permission-from-owner", + "usage": "readme-only", + "sha256": "6546afdf0ae4a374e13e884fdb2f34264db81303dd50640f1fe902686dc10f5f" + } + } +} diff --git a/docs/assets/sponsors/novita-color.png b/docs/assets/sponsors/novita-color.png new file mode 100644 index 00000000..bb23a951 Binary files /dev/null and b/docs/assets/sponsors/novita-color.png differ diff --git a/docs/assets/sponsors/ppio-color.png b/docs/assets/sponsors/ppio-color.png new file mode 100644 index 00000000..71b85541 Binary files /dev/null and b/docs/assets/sponsors/ppio-color.png differ diff --git a/docs/internal/README.md b/docs/internal/README.md index a1643f41..c5c82df3 100644 --- a/docs/internal/README.md +++ b/docs/internal/README.md @@ -40,5 +40,4 @@ | [blank-machine-verification-plan.md](blank-machine-verification-plan.md) | 空白机器验证的断言清单(执行入口已移除) | | [recent-work-summary.md](recent-work-summary.md) | 一次阶段性完工清单,已被上面几份取代 | | [mvp-agent-installer-plan.md](mvp-agent-installer-plan.md) | 最初的 HTTP/Python 原型,仅存背景 | -| [cc-switch-reference-notes.md](cc-switch-reference-notes.md) | 对 CC Switch 的定向调研与采纳/不采纳结论 | | [release-evidence/](release-evidence/) | 历史发行包的 SHA-256 与 cleanroom 记录 | diff --git a/docs/internal/cc-switch-reference-notes.md b/docs/internal/cc-switch-reference-notes.md deleted file mode 100644 index d2741bb5..00000000 --- a/docs/internal/cc-switch-reference-notes.md +++ /dev/null @@ -1,168 +0,0 @@ -# CC Switch 参考笔记 - -对 [CC Switch](https://github.com/farion1231/cc-switch) 的一次定向调研,用途是为 OneAgent 的 Agent 配置界面找可借鉴的做法。**只做参考,不移植代码**——两者许可、技术栈与产品定位都不同。 - -调研版本:`cc-switch` 3.18.0(commit `708b387`,2026-07-27),MIT。克隆在 `output/reference/cc-switch`,该目录被 `.gitignore` 忽略,不进仓库。 - -## 1. 两者定位差异(先说清,避免误抄) - -| | CC Switch | OneAgent | -| --- | --- | --- | -| 形态 | Tauri 桌面应用(Rust + React) | Wails 桌面应用(Go + React) | -| 职责 | Provider 配置的**存取与切换** | Agent 的**检测、安装、配置** | -| 配置模型 | 整块存原始配置对象 | 结构化字段,由适配器翻译 | -| 外围能力 | 本地代理、熔断器、故障转移、用量统计、MCP、skills、prompts、sessions | 无 | -| 表单规模 | 共享编排器 `ProviderForm.tsx` 2693 行 + 共享 hooks/字段约 6000 行 + 各应用专属区块 | `AgentProfilePage.tsx` 263 行 | - -它的 `src/components/` 下有 19 个子目录(mcp、skills、prompts、sessions、proxy、usage…)。这些不在 OneAgent 的产品边界内(见 [产品边界基线](../product-boundary-baseline.md)),尤其**本地代理与故障转移属于明确禁止范围**,不予借鉴。 - -## 2. 配置模型:它存原始对象,我们存结构化字段 - -CC Switch 的 `Provider`(`src/types.ts:11`)核心只有一个配置字段: - -```ts -settingsConfig: Record // Claude 为 settings.json;Codex 为 { auth, config } -``` - -其余全是元数据:`icon` / `iconColor` / `category` / `sortIndex` / `notes` / `isPartner` / `inFailoverQueue`。 - -**含义**:存储层整块存 Agent 的原始配置对象。 - -**更正**:先前记录的「它不理解字段语义,用户需要自己懂 `settings.json` 的结构」过头了。存储层不解析语义,但 UI 与 Service 层仍会理解、校验和编辑字段——`ClaudeFormFields` 认得 API 格式、认证字段名与模型映射,`useCodexTomlValidation` 会校验 TOML。差异在存储模型,不在「是否理解语义」。 - -**更正**:先前记录的「CC Switch 从不安装 Agent」不准确。`src-tauri/src/commands/misc.rs:452` 起有一键安装,OpenClaw 走 `npm i -g openclaw@latest`,Hermes 走 `NousResearch/hermes-agent` 的官方 install.sh。这不改变 OneAgent 仍将两者列为 guide-only 的结论——理由是常驻网关形态被 ADR-002/ADR-003 划在范围外,与能否安装无关。 - -**OneAgent 的做法相反且更适合当前定位**:`agents/.json` 存 `provider` / `model` / `base_url` 等结构化字段,由 5 个适配器翻译成各 Agent 的格式。用户不需要知道目标文件长什么样。这个差异是设计选择,不是我们缺功能,**不要向它靠拢**。 - -字段量级对比:它的 Claude 表单认 12 个 `ANTHROPIC_*` 环境变量(含 Opus / Sonnet / Haiku / Fable 分模型指定),我们只写 4 个。 - -## 3. 值得借鉴:官方图标来源 - -CC Switch 依赖 **`@lobehub/icons-static-svg`**(MIT,723 个 AI 品牌 SVG)。核对结果: - -| 我们需要的 | lobehub 是否提供 | -| --- | --- | -| Codex(openai) | **有** `openai.svg` | -| Claude Code(claude / anthropic) | 有 | -| Cursor(guide-only) | 有 | -| OpenCode | 无 | -| Aider | 无 | -| Kilo CLI | 无 | - -`openai.svg` 的形态与 OneAgent 的图标规范完全一致,可直接内联: - -``` - -``` - -这把官方图标覆盖从 2/5 提到 3/5,Codex 不必再自绘。OpenCode 沿用 simple-icons(CC0)已有的官方图标,只有 Aider 与 Kilo 仍需自绘。 - -### 更正:八个 Agent 全部有官方图标 - -先前判断「Codex / Aider / Kilo 无官方图标」是错的,那只说明 simple-icons 里没有。逐个核对各项目自己的站点与仓库后,八个全都有: - -| Agent | 官方来源 | -| --- | --- | -| Codex | lobehub `openai.svg`(MIT) | -| Claude Code | `claude.ai/favicon.svg`(品牌橙 `#D97757`) | -| Cursor | `cursor.com/favicon.svg` | -| OpenCode | lobehub `opencode.svg`(MIT) | -| OpenClaw | 官方仓库 `docs/assets/pixel-lobster.svg`(MIT) | -| Hermes | `hermes-agent.nousresearch.com/icon.png`(48px,无矢量版) | -| Kilo CLI | `kilocode.ai/favicon/favicon.svg` | -| Aider | `aider.chat/assets/icons/favicon-32x32.png` | - -这些来源只能证明「站点上存在一个图像」,不能单独证明 OneAgent 有权复制并随二进制再分发。当前实现只保留有完整权利清单的 Codex、OpenCode、OpenClaw 资产;Claude Code、Cursor、Hermes、Kilo CLI 和 Aider 使用通用 Lucide 符号。**结论:判断某个品牌「没有官方图标」之前,要查该项目自己的站点;决定能否随产品再分发之前,还要取得许可证或书面授权。** - -两个资产不能直接用,需换等价版本:`openai.com/favicon.svg` 与 `opencode.ai/favicon.svg` 都带 `:root` CSS 变量和 `prefers-color-scheme` 媒体查询,内联进宿主文档会污染全局样式;`aider.chat/assets/logo.svg` 是 200×60 的文字标加高斯模糊滤镜,不是方形图标。 - -**OpenClaw 的标志是龙虾,不是螃蟹。** 所以图标要以上游官方资产为准,不要以任何第三方项目的转绘为准——这一条对我们自己同样适用。 - -### OpenClaw 与 Hermes 的图标不可取用 - -核对 `src/icons/extracted/`(98 个文件)的结果: - -- **OpenClaw** 是 CC Switch **自绘**的彩色 SVG,`viewBox="0 0 120 120"`,用 `linearGradient` 从 `#ff4d4d` 渐变到 `#991b1b`,配青色眼睛。不是官方 logo。 -- **Hermes** 是一张 256×256 PNG(39 KB),不是矢量。 - -两者都无法满足 24×24 单色 `currentColor` 的规范:渐变填充无法继承 `currentColor`,位图在 18px 渲染位与矢量字形并排时轻重不一。因此这两个按同一几何规范自绘,而不是取用 CC Switch 的资产。这不是许可问题(MIT 允许取用),是形态不兼容。 - -**注意**:这个包在 CC Switch 的源码里没有被引用,实际使用的是 `src/assets/icons/` 下手工的 `chatgpt.svg` 与 `claude.svg`。结论对我们有用的部分是方法论:「某个项目装了什么依赖」不能作为该依赖可用的证据,仍需自己核对。 - -**许可与商标**:MIT 覆盖 SVG 文件本身,不覆盖商标权。在自己 UI 内标示「这一行是哪个 Agent」属指示性使用;不得用作 OneAgent 的产品视觉资产。统一 `currentColor` 单色渲染,既统一风格也避免为第三方商标着色。 - -## 4. 值得借鉴:高级项用折叠,不做模式切换 - -`ClaudeFormFields.tsx:800` 的做法: - -```tsx - - - {!advancedExpanded &&

{t("providerForm.advancedOptionsHint")}

} - - -``` - -两个细节值得抄: - -**折叠而非模式切换。** 默认收起、需要时展开,比切换「简单/高级」模式轻,也不会让用户困在错误的模式里出不来。 - -**收起时显示一行说明里面有什么**,而不是只留一个光秃的三角。它的原文是: - -> 包含 API 格式、认证字段、模型映射等配置。大多数场景下保持默认即可。 - -最后一句尤其值得学:明确告诉用户「不用管」,而不是让人担心自己漏配了什么。 - -它折叠区里的字段:API 格式(Anthropic / OpenAI Chat / OpenAI Responses)、认证字段名(`ANTHROPIC_AUTH_TOKEN` vs `ANTHROPIC_API_KEY`)、模型映射与显示名、分模型指定、一键设置。 - -### OneAgent 未来的候选高级项 - -按同一收纳方式,优先级从高到低: - -1. **认证字段名切换**——已有真实差异(Claude 系可读两个不同变量名)。 -2. **分模型指定**——Opus / Sonnet / Haiku 各自的模型名,Claude Code 支持。 -3. 请求超时。 -4. 自定义 User-Agent。 - -现阶段都不做。当前 218 行的详情页方向正确,加高级项前应先有真实需求。 - -## 5. 值得借鉴:预设机制(方向与我们相反) - -它为每个 Agent 备了 `src/config/*ProviderPresets.ts`(Claude、Codex、Gemini、OpenCode 各一份),用户选预设而非从零填写。预设的最小形态: - -```ts -{ - name: "Claude Official", - websiteUrl: "https://www.anthropic.com/claude-code", - settingsConfig: { env: {} }, - isOfficial: true, - category: "official", - icon: "anthropic", -} -``` - -**与 OneAgent 的 `profiles/` 模板方向相反**:它的预设是**内置的服务商清单**(我们出,用户选),我们的模板是**用户自存的组合**(用户出,用户复用)。两者不冲突,可以并存——内置预设降低首次配置成本,用户模板降低重复配置成本。 - -若将来要做内置预设,注意 `isPartner` / `primePartner` / `partnerPromotionKey` 这类商业合作字段**不要引入**:[产品边界基线](../product-boundary-baseline.md) 第 8 节要求公开权益文案不得承诺固定额度,带推广属性的预设排序会踩这条线。 - -## 6. UI 布局:与我们已高度一致 - -`ProviderCard.tsx` 的结构是**图标 + 主信息 + 右侧操作 + 底部分隔线**,与 OneAgent 刚落地的 `AgentManageRow` 基本同构,无需调整。 - -它多出的部件是我们当前不需要的:健康状态指示器(`HealthStatusIndicator`)、故障转移优先级徽章(`FailoverPriorityBadge`)、拖拽排序(`@dnd-kit`)。前两个依赖本地代理,属于边界外。 - -## 7. 结论 - -**采纳**: - -- lobehub 的 `openai.svg` 替换自绘的 Codex 图标(第 3 节)。 -- 高级项一律用折叠收纳,收起时带一行说明(第 4 节)。 - -**明确不采纳**: - -- 整块存原始配置 —— 我们的结构化模型更适合「用户不必懂目标格式」的定位。 -- 本地代理、熔断器、故障转移 —— 产品边界禁止。 -- 商业合作伙伴字段与推广排序 —— 与公开权益文案约束冲突。 -- 拖拽排序、健康徽章 —— 当前无对应需求。 - -相关文档:[前端管理控制台改造计划](frontend-management-console-plan.md)、[产品边界基线](../product-boundary-baseline.md)、[CC Switch 可选配置说明](../ai-agent-kit/zh/tools/cc-switch.md)。 diff --git a/providers.lock.json b/providers.lock.json index 91cb0e76..c2caae47 100644 --- a/providers.lock.json +++ b/providers.lock.json @@ -8,8 +8,8 @@ "base_url": "https://api.ppio.com/openai", "anthropic_base_url": "https://api.ppio.com/anthropic", "fallback_probe_model": "deepseek/deepseek-v3", - "relationship": "none", - "disclosure": "", + "relationship": "sponsor", + "disclosure": "PPIO sponsors OneAgent development. Sponsorship does not affect Agent rank, compatibility conclusions, default selection, or connection tests.", "referral_url": "", "order": 1, "protocols": { @@ -24,8 +24,8 @@ "base_url": "https://api.novita.ai/openai", "anthropic_base_url": "https://api.novita.ai/anthropic", "fallback_probe_model": "deepseek/deepseek_v3", - "relationship": "none", - "disclosure": "", + "relationship": "sponsor", + "disclosure": "Novita sponsors OneAgent development. Sponsorship does not affect Agent rank, compatibility conclusions, default selection, or connection tests.", "referral_url": "", "order": 2, "protocols": {