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
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

| 工具 | 推荐版本 | 来源与用途 |
| :--- | :--- | :--- |
| **Go** | 1.26+ | 核心控制平面、CLI、TUI、HTTP API 与 SQLite 状态机 |
| **Node.js** | 24+ | 前端管理界面(`web/` 目录下的 React 18 + Vite) |
| **Go** | 遵循 [go.mod](go.mod),当前 1.26.10 | 核心控制平面、CLI、TUI、HTTP API 与 SQLite 状态机 |
| **Node.js** | 24+ | 前端管理界面(`web/` 目录下的 React 19 + Vite) |
| **Git** | 2.41+ | 源码版本管理 |
| **Rust** *(可选)* | 1.97.1+ | 仅在修改或验证 `analyzers/` 目录下的 WASI 代码分析器时需要 |

Expand Down Expand Up @@ -175,7 +175,7 @@ cd ..
- **React 前端** 负责用户交互呈现与视觉效果,不私自推导或伪造未经后端确认的状态。
3. **纯 CSS 现代性能标准**:
- 界面视觉效果优先使用现代纯 CSS 属性(如 `backdrop-filter`、多层 `box-shadow` 内阴影、`linear-gradient`)。
- 避免引入高开销的 SVG 位移滤镜(如 `feTurbulence`)或全屏 WebGL Canvas,确保在展示大量代码和日志输出时保持 120fps 丝滑滚动。
- 涉及滚动和视觉效果的改动应在实际页面验证;性能结论应记录测量环境与结果。
4. **统一规范的产品命名**:
- 所有面向用户的标题、文案、关于页面与文档中,产品官方名称一律统一为 **`Universal-Code`**。

Expand All @@ -190,7 +190,7 @@ cd ..
git checkout -b feat/support-deepseek-r1
```
2. 保持 Commit 粒度清晰,提交信息简明扼要。
3. 在本地完整运行并通过 `npm test` 和 `go test`。
3. 运行覆盖本次改动的相关测试和必需检查,在 PR 中记录验证范围与结果。
4. 在 GitHub 上发起 Pull Request,简要说明:
- **改动背景**:解决了什么问题或增加了什么特性。
- **关键设计**:采用了什么样的架构思路。
Expand Down
9 changes: 5 additions & 4 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<img alt="Platform" src="https://img.shields.io/badge/Platform-Windows%20%7C%20macOS-blueviolet?style=flat-square">
<img alt="Go" src="https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go&logoColor=white">
<img alt="Node" src="https://img.shields.io/badge/Node.js-24+-339933?style=flat-square&logo=node.js&logoColor=white">
<img alt="React" src="https://img.shields.io/badge/React-18-61DAFB?style=flat-square&logo=react&logoColor=black">
<img alt="React" src="https://img.shields.io/badge/React-19-61DAFB?style=flat-square&logo=react&logoColor=black">
<a href="CONTRIBUTING.md"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square"></a>
</p>
<p>
Expand All @@ -31,10 +31,10 @@
## Highlights

- **Built for Local Repositories**: Read, inspect, and edit local codebases with built-in line-by-line diff inspection and auditable checkpoints (Rewind).
- **Transparent Permission Control**: Choose between read-only analysis, approval-gated runs, and automated Full Access. High-risk actions (file deletion, unlisted commands) always require manual confirmation.
- **Transparent Permission Control**: Ask / Auto / Full authorization allows, requests approval for, or denies operations according to current permissions, verified effects, and safety policy. Full requires explicit activation in the current process.
- **Ready for Any Model**: Native support for OpenAI, Anthropic Claude, DeepSeek, Kimi, local Ollama models, and custom OpenAI-compatible endpoints with on-the-fly model switching. Also supports quick browser-based ChatGPT account sign-in.
- **Traceable Web Research**: Prioritizes provider-hosted native search, fetches GitHub Issues/PRs, Hacker News, and RSS/Atom feeds, and keeps source snapshots and citations.
- **Modern Liquid Glass Aesthetic**: Crafted with pure CSS optical refraction (macOS / VisionOS acrylic style), supporting Dark, Light, and Mist frosted themes at a responsive 120fps.
- **Switchable Interface Themes**: Dark, Light, and Mist themes use CSS blur, translucent backgrounds, gradients, and edge shadows for a glass-like appearance.

---

Expand All @@ -52,7 +52,7 @@ Packages retain their historical filenames; the product name shown in the applic

### Option 2: Build from Source

Install **Go as pinned in [go.mod](go.mod), currently 1.26.9**, and **Node.js 24** (CI uses 24.16.0), then clone the repository:
Install **Go as pinned in [go.mod](go.mod), currently 1.26.10**, and **Node.js 24** (CI uses 24.16.0), then clone the repository:

```bash
git clone https://github.com/CWNU-Open-Source-Community/Universal-Code.git
Expand Down Expand Up @@ -110,6 +110,7 @@ Switch between **System, Light, Dark, and Mist** under **Settings → Appearance
| :--- | :--- | :--- |
| **User Guide** | [Usage Guide](docs/usage.md) | Client walkthrough, CLI commands, and typical workflows |
| **Web Research** | [Search & Citations](docs/web-evidence.md) | Search setup, snapshot storage, URL provenance, and diagnostics |
| **Chat Resources** | [Links, Files & Clipboard](docs/chat-resource-interactions.md) | Link previews, resource context menus, and file/image copy and paste |
| **Code Auditing** | [Workspace Checkpoints](docs/workspace-checkpoints.md) | Line-by-line diff review, snapshots, and safe Rewind |
| **Extensions** | [Extensions & MCP](docs/extensions.md) | Integrating Model Context Protocol (MCP) and custom skills |
| **Code Intelligence** | [LSP Support](docs/code-intelligence.md) | Symbol jump, type inference, and repository index |
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<img alt="Platform" src="https://img.shields.io/badge/Platform-Windows%20%7C%20macOS-blueviolet?style=flat-square">
<img alt="Go" src="https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat-square&logo=go&logoColor=white">
<img alt="Node" src="https://img.shields.io/badge/Node.js-24+-339933?style=flat-square&logo=node.js&logoColor=white">
<img alt="React" src="https://img.shields.io/badge/React-18-61DAFB?style=flat-square&logo=react&logoColor=black">
<img alt="React" src="https://img.shields.io/badge/React-19-61DAFB?style=flat-square&logo=react&logoColor=black">
<a href="CONTRIBUTING.md"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square"></a>
</p>
<p>
Expand All @@ -31,10 +31,10 @@
## 核心特性

- **深度聚焦本地项目**:直接阅读、分析与修改本地代码库,内置 Diff 逐行审阅与可信撤销(Rewind / Checkpoints)能力。
- **透明可控的安全策略**:支持只读分析、交互审批(Approval Mode)与全自动(Full Access)权限分级,高危操作(文件删除、非白名单命令)严格阻断并要求人工确认。
- **透明可控的安全策略**:采用 Ask / Auto / Full 分级授权;操作按当前权限、实际影响和安全策略自动执行、请求审批或拒绝,Full 须在当前进程显式激活。
- **主流模型即开即用**:原生接入 OpenAI、Anthropic Claude、DeepSeek、Kimi、Ollama 本地模型与任何兼容 OpenAI 的第三方 API,支持单会话内即时热切,并支持通过系统浏览器快速完成 ChatGPT 账户授权登录。
- **真实来源的网络检索**:优先调用供应商原生搜索,支持直接抓取 GitHub PR/Issue、Hacker News 与 RSS/Atom 资讯,自动附带快照存证与引用出处。
- **现代苹果液态玻璃美学**:采用纯 CSS 物理折射模型(macOS / VisionOS 亚克力液态玻璃风格),提供深色、浅色与雾透磨砂质感,兼具 120fps 极速渲染。
- **可切换的界面主题**:提供深色、浅色与雾透主题,使用 CSS 模糊、半透明背景、渐变和边缘阴影呈现玻璃质感。

---

Expand All @@ -52,7 +52,7 @@

### 方式二:从源码构建运行

安装 **Go(版本遵循 [go.mod](go.mod),当前为 1.26.9)** 与 **Node.js 24**(CI 使用 24.16.0),然后克隆仓库:
安装 **Go(版本遵循 [go.mod](go.mod),当前为 1.26.10)** 与 **Node.js 24**(CI 使用 24.16.0),然后克隆仓库:

```bash
git clone https://github.com/CWNU-Open-Source-Community/Universal-Code.git
Expand Down
10 changes: 6 additions & 4 deletions assets/branding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ a glass globe with a terminal prompt and a segmented navy ring on a soft white r
- SHA-256: `a97e71e5f373d5d48ce24e39360cd390be2beabfe731037ac114ec38f12407d6`
- Source treatment: preserved exactly as supplied; no generative redraw

Web, Windows, and macOS assets are deterministic resize, rounded-alpha-mask,
or container-format derivatives of this master. This includes the checked-in
300×300 Partner Center listing icon. The artwork itself is not redrawn or
simplified. Regenerate every tracked derivative with:
Web, Windows, and macOS assets use a deterministic centered crop of the middle
60% of this master, followed by resizing, rounded-alpha masking and platform
container encoding. Removing the presentation padding makes the navy mark occupy
about 75% of each icon, including the 16px and 32px taskbar/favicon sizes. This
also applies to the checked-in 300×300 Partner Center listing icon. The master
and the artwork remain unchanged. Regenerate every tracked derivative with:

```powershell
pwsh ./scripts/generate-brand-assets.ps1
Expand Down
Binary file modified cmd/cyberagent-desktop/traverse_board_windows_amd64.syso
Binary file not shown.
Binary file modified cmd/cyberagent-desktop/traverse_board_windows_arm64.syso
Binary file not shown.
37 changes: 37 additions & 0 deletions docs/acceptance/icon-optical-size-20261021/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# 平台图标主体大小验证

原图中的展示留白被整体缩入图标,32px 图标的深色主体只有 14×14px。
生成脚本现在使用母版中心的 60% 区域,32px 图标主体为 24×23px,
16px 图标主体为 12×11px。母版、终端图形和圆角透明遮罩保持原样。
尺寸按不透明深蓝像素的边界计算,抗锯齿会使横纵边界相差一个像素。

## 真实页面前后截图

- 前:主线提交 `e578c225f517fa381f1321919330da8db5881856` 的原始资产。
- 后:同一份代码,应用本次生成脚本及其派生资产。
- 两者均使用锁文件安装依赖并执行 `npm --prefix web run build`,
通过 Vite preview 打开实际连接页面;Chromium,1280×900 CSS px,2026-10-21。
- 深色截图使用应用已有的 `prayu.theme=dark` 偏好。未替换页面 DOM 或绘制模拟界面。

| 浅色:修改前 | 浅色:修改后 |
| --- | --- |
| ![浅色修改前](icon-size-before-light.png) | ![浅色修改后](icon-size-after-light.png) |

| 深色:修改前 | 深色:修改后 |
| --- | --- |
| ![深色修改前](icon-size-before-dark.png) | ![深色修改后](icon-size-after-dark.png) |

## 已运行验证

- 新的小图标主体占比回归测试在旧资产上失败,在新资产上通过。
- `go test -count=1 ./internal/releasegate` 通过,包含母版与派生件同步、
ICO/COFF 一致性、ICNS Retina 尺寸槽及 PNG 尺寸/透明度检查。
- `go test -count=1 -tags 'desktop,wv2runtime.error' ./cmd/cyberagent-desktop -run TestDesktopWindowsResourcesPreserveDPIAndIcons`
通过,确认 EXE 资源保留 PerMonitorV2、asInvoker 及正确图标。
- Windows 视觉资产清单校验通过,53 个 PNG 满足尺寸、格式和文件大小要求。
- 前端品牌组件 3 项测试、类型检查与生产构建通过。
- 本机使用 `desktop,production,wv2runtime.error` 编译 Windows EXE 成功;
从 EXE 提取的 32px 图标与生成的 PNG 逐像素一致。
- 母版 SHA-256 仍为 `a97e71e5f373d5d48ce24e39360cd390be2beabfe731037ac114ec38f12407d6`。

本次截图覆盖 Web 连接页面;macOS ICNS 已检查容器和尺寸,尚未在 macOS Dock 中目视验证。
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ The production React bundle is built by Vite but hosted only when Go receives an

## Core Domain

`Run` is a domain aggregate, not a programming language, operating-system process, or replacement for Go/TypeScript/Rust. Go creates and owns Run lifecycle state; TypeScript may display and control it through Go APIs. Rust never owns a Run. The current analyzer fixture has no Run field or product bridge; a future Go adapter may bind a validated analyzer operation to a Run outside the Rust wire contract.
`Run` is a domain aggregate, not a programming language, operating-system process, or replacement for Go/TypeScript/Rust. Go creates and owns Run lifecycle state; TypeScript may display and control it through Go APIs. Rust never owns a Run. Go application services bind the fixed embedded digest analyzer to a Run and commit its execution evidence. The Rust wire contract remains free of Run identity and authority. See the [Analyzer README](../analyzers/README.md) for the current execution boundary.

Budget, events, sandbox sessions, and reports are Run-scoped rather than embedded into one large object. Their modules remain independent and persist references by `run_id`; `AgentRunner` coordinates their lifecycle.

Expand Down Expand Up @@ -1041,7 +1041,7 @@ internal/store/ SQLite stores and migrations
internal/session/ Compatibility conversation service
internal/tui/ Bubble Tea adapter
internal/httpapi/ Loopback-only read/control API, OpenAPI contract, and bounded Run-event SSE
internal/analyzer/ Go-owned analyzer protocol, validation, and future bridge boundary
internal/analyzer/ Go-owned analyzer protocol, validation, and embedded WASI execution boundary
```

Packages split when a concrete implementation establishes different ownership. New tools and integrations reuse these services and add focused behavior tests for their contracts.
Expand Down Expand Up @@ -1334,6 +1334,9 @@ records these bounds.

## Go-Owned Analyzer Protocol And Rust Fixture

The following P10-A/B sections record the initial implementation stages. For the
current product execution path, see the [Analyzer README](../analyzers/README.md).

P10-A1 establishes `internal/analyzer` as a pure Go protocol owner rather than a process
launcher. `analyzer_protocol.v1` accepts one canonical inline Base64 payload plus explicit
limits and four capability declarations that must all be false. Strict decoding rejects
Expand Down
24 changes: 16 additions & 8 deletions docs/architecture/bounded-project-tests.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# Bounded project tests

`run_tests` is the root Supervisor's project test entry point in Code Plan and
Deliver. Review is a workflow state, not an execution phase: the domain has
`run_tests` is the project test entry point in Code Plan and Deliver for the root
Supervisor and recorded `specialist_runner` workers with matching WorkerAuthority.
Review is a workflow state, not an execution phase: the domain has
only `plan` and `deliver` phases.

The request contains `version: "run-tests.v1"`, a relative directory `target`,
and `timeout_milliseconds` from 1 through 25000. The host resolves the pinned
The request contains `version: "run-tests.v1"`. `action: "run"` (the default when
omitted) takes a relative directory `target` and `timeout_milliseconds` from 1
through 25000. Longer tests use `action: "start"` with a timeout up to 1800000 ms,
then `action: "wait"` with the original `job_id`, returned `cursor`, `max_bytes`
(4–32768), and `wait_milliseconds` (1–5000). Wait observes the existing Job without
a new target or timeout; repeating start is not a polling operation.

The host resolves the pinned
project test ID or detects a supported project through the existing project
action registry. It chooses the executable, literal arguments, environment,
closed stdin, disabled network intent, output bounds and empty credentials.
Expand All @@ -21,10 +28,11 @@ fall back to the host. Dependency installation retains its sandbox-only gate.
The prepared command is pinned in the durable tool authority and regenerated
before approval and dispatch. The existing command authorizer, Run lease,
root attempt, gateway tool budget, command budget, timeout, cancellation and
Job/output receipts remain authoritative. A test runs as one synchronous Job;
failed or timed-out Jobs are returned as test evidence. A completed call is
replayed without starting another Job. Specialist calls retain their existing
bounded validation tools and child budget; `run_tests` grants no child access.
Job/output receipts remain authoritative. Each run/start creates one Job; wait
returns bounded output and status for that Job, retaining its original actor and
authority. Failed or timed-out Jobs are returned as test evidence. A completed
call is replayed without starting another Job. Worker execution retains its
recorded assignment, WorkerAuthority, and child budget checks.

General `command_runtime` remains Deliver-only. Plan Job insertion additionally
requires a pending `run_tests` call with matching actor, command fingerprint,
Expand Down
10 changes: 6 additions & 4 deletions docs/branding/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,16 @@ canonical repository URLs while preserving compatibility identifiers.
尺寸为 1254×1254,保留原始白色圆角承托;SHA-256 为
`a97e71e5f373d5d48ce24e39360cd390be2beabfe731037ac114ec38f12407d6`。

Web、Windows 与 macOS 资产只允许从该母版进行确定性的缩放、圆角透明遮罩和容器
格式转换,不得用字母 `T`、旧 `P` 标志或生成式重绘替代。小尺寸界面使用图形标志
Web、Windows 与 macOS 资产从母版中心的 60% 区域进行确定性裁切,再缩放、添加圆角
透明遮罩并转换容器格式。这样去掉展示留白,让图形主体占图标约 75%,在 16px、32px
任务栏与 favicon 中保持可辨认;母版本身不变。不得用字母 `T`、旧 `P` 标志或生成式重绘替代。小尺寸界面使用图形标志
本身,并由周围的可访问名称提供完整产品名。运行
`pwsh ./scripts/generate-brand-assets.ps1` 可一次重建所有受版本控制的平台派生件。

The maintainer-supplied glass globe, terminal prompt, and segmented navy ring are the official Universal-Code icon.
Platform assets are deterministic resize, rounded-alpha-mask, and container derivatives of
the exact supplied master above; generative redraws and letter placeholders are not canonical.
Platform assets use a centered crop of the middle 60% of the exact supplied master, followed
by resizing, rounded-alpha masking, and container conversion. The mark occupies about 75%
of the output while the master remains unchanged; generative redraws and letter placeholders are not canonical.

| Surface | Derived assets |
|---|---|
Expand Down
4 changes: 2 additions & 2 deletions docs/ci.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ successful aggregate result. Unclassified build inputs select full checks.

## Go security baseline

The supported build toolchain is Go **1.26.9**, pinned by `go.mod`. Both central
The supported build toolchain is Go **1.26.10**, pinned by `go.mod`. Both central
CI and release builders read that exact version with `go-version-file`.
This avoids selecting an older patch while the setup-go version catalog lags
behind a new Go security release. Local desktop builders require the same
version; set `GOTOOLCHAIN=go1.26.9` when another Go toolchain is installed.
version; set `GOTOOLCHAIN=go1.26.10` when another Go toolchain is installed.
The module's minimum version alone cannot exclude vulnerable newer release
branches, such as Go 1.27.0 and 1.27.1; a larger version is not security evidence.
The Windows fixed-toolchain fixture must match the exact version selected by
Expand Down
Binary file added docs/evidence/markdown-current-state/after.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/evidence/markdown-current-state/before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading