Skip to content

Commit ecd39f4

Browse files
committed
feat: introduce Prayu desktop experience
1 parent 21c8f5a commit ecd39f4

35 files changed

Lines changed: 1335 additions & 76 deletions

‎README.md‎

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CyberAgent Workbench
1+
# Prayu
22

33
> 本地优先、可恢复、可审计的通用 AI Agent 工作台<br>
44
> A local-first, resumable, and auditable workbench for general-purpose AI agents.
@@ -19,20 +19,24 @@ Starting with schema v49, the project reports two engineering indicators so arch
1919

2020
### 中文
2121

22-
CyberAgent Workbench 是一个由 Go 驱动的本地 AI Agent 工作台,面向代码开发、代码审查、安全学习、脚本任务和受控网络安全分析。它把模型调用、长上下文、工作区文件、策略检查、审批、执行预算和事件记录统一到一套可恢复的运行时中,让一次任务即使在程序退出后也能继续,并且每一步都可以追踪和复核。
22+
Prayu 是一个由 Go 驱动的本地 AI Agent 工作台,面向代码开发、代码审查、安全学习、脚本任务和受控网络安全分析。它把模型调用、长上下文、工作区文件、策略检查、审批、执行预算和事件记录统一到一套可恢复的运行时中,让一次任务即使在程序退出后也能继续,并且每一步都可以追踪和复核。
2323

2424
每个用户目标会被记录为一个 `Mission`,每次可恢复的执行过程则是一个 `Run`。Go 是唯一控制平面,负责模型路由、状态机、SQLite 持久化、安全策略和工具边界;TypeScript read-mostly 控制台与当前 Rust 确定性协议夹具都受 Go 定义的边界约束,不绕过安全控制。
2525

2626
项目当前优先完善通用 Agent 运行时及其受控多 Agent 内核。CTF 将作为后续 Profile 和 Skills 能力接入,而不是另建一套独立运行系统。
2727

28+
`Prayu` 是当前产品与界面名称。为保护已有脚本、数据库和凭证,CLI 命令 `cyberagent`、Go module `cyberagent-workbench`、数据目录 `.cyberagent-workbench`、`CYBERAGENT_*` 环境变量、HTTP 兼容头和凭证目标暂不迁移;它们是兼容标识,不是第二套产品或控制平面。
29+
2830
### English
2931

30-
CyberAgent Workbench is a local AI agent workbench powered by Go for coding, code review, security learning, scripting, and controlled cybersecurity analysis. It unifies model calls, long-context memory, workspace files, policy checks, approvals, execution budgets, and event history in one resumable and auditable runtime.
32+
Prayu is a local AI agent workbench powered by Go for coding, code review, security learning, scripting, and controlled cybersecurity analysis. It unifies model calls, long-context memory, workspace files, policy checks, approvals, execution budgets, and event history in one resumable and auditable runtime.
3133

3234
Each user objective is stored as a `Mission`, while each resumable execution attempt is a `Run`. Go is the sole control plane for model routing, state machines, SQLite persistence, safety policy, and tool boundaries. The TypeScript console and the current deterministic Rust protocol fixture remain behind Go-defined boundaries instead of bypassing those controls.
3335

3436
The current priority is the general-purpose Agent runtime and its controlled multi-agent kernel. CTF capabilities will be added later as Profiles and Skills on the same foundation rather than as a separate execution system.
3537

38+
`Prayu` is the current product and interface name. The `cyberagent` CLI, `cyberagent-workbench` Go module, `.cyberagent-workbench` data directory, `CYBERAGENT_*` environment variables, compatibility HTTP headers, and credential targets remain stable to protect existing scripts, databases, and credentials. They are compatibility identifiers, not a second product or control plane.
39+
3640
## 开发历程 / Development History
3741

3842
下表是唯一按时间排序的 schema 开发历程,完整保留了早期 `v1`、`v2`、`v3`,并连续列到当前 `v84`。这里的 `vN` 是不可变 SQLite schema/runtime 里程碑,不等同于产品发布版本;后面的架构说明按能力域组织,因此不再承担版本排序职责。
@@ -2074,13 +2078,39 @@ known high/medium issue remains on an enabled path. Product process transport, R
20742078
SQLite persistence, Artifact commit, CLI/HTTP/Desktop invocation, and all execution
20752079
authority remain closed. ADR 0063 is authoritative.
20762080

2081+
### D1-UX1/UX2/UX3:Prayu 品牌、双界面主题与响应式交互
2082+
2083+
本批不新增 migration,schema/OpenAPI 继续保持 v84 与 75 path / 83 operation / 182 schema。
2084+
D1-UX1 将用户可见产品名统一为 `Prayu`,同时保留 `cyberagent` CLI、Go module、数据目录、
2085+
环境变量、HTTP 兼容头、凭证目标和 Windows class name,避免破坏既有脚本、数据与凭证。
2086+
2087+
D1-UX2 使用用户提供的工作台背景、Prayu 艺术字和选中态笔刷素材,并为设置页使用独立背景。
2088+
工作台正文采用米黄色半透明表面;任务、Run 和设置导航的选中态统一为暖黑底、右侧橙色笔刷、
2089+
橙色图标与米黄色文字。D1-UX3 增加可操作的设置导航、只读运行时事实、仅影响显示密度的本地
2090+
偏好,以及 1440x900 与 390x844 两档响应式布局。设置页只投影 Go 返回的事实,不保存密钥、
2091+
不判断权限,也不启动模型、工具或进程。
2092+
2093+
三切片功能门通过 400.5 秒 uncached 全仓 Go、vet、38 文件 137 项 React、strict TypeScript、
2094+
确定性 OpenAPI、Vite、npm 零漏洞、7+2 Rust、fmt/clippy、secure Desktop 和 Windows 可复现
2095+
双构建;浏览器视觉复核覆盖 1440x900 与 390x844。架构约 99%、完整产品可用度约 95-97%、
2096+
通用 Coding Agent 约 95-96%、Cyber 自动化约 20% 的口径不因视觉改版而虚增。
2097+
2098+
This non-schema D1-UX1/UX2/UX3 batch introduces the Prayu product identity while
2099+
preserving established CyberAgent compatibility identifiers. It uses the supplied
2100+
workspace, wordmark, and active-brush assets, gives Settings a distinct background,
2101+
and standardizes the selected state as a warm dark surface with an orange brush,
2102+
orange icon, and cream text. The cream translucent work surface, functional Settings
2103+
navigation, read-only runtime facts, display-only density preference, and desktop/mobile
2104+
layouts add no renderer authority. TypeScript still cannot read credentials, decide
2105+
Policy, call models or tools, or start host/container processes. ADR 0064 is authoritative.
2106+
20772107
## Project Memory
20782108

20792109
Read [docs/PROJECT_MEMORY.md](docs/PROJECT_MEMORY.md), [docs/PROJECT_STATUS.md](docs/PROJECT_STATUS.md), [docs/PROGRESS_BOOK.md](docs/PROGRESS_BOOK.md), [docs/TASK_BOOK.md](docs/TASK_BOOK.md), [docs/http-api.md](docs/http-api.md), [docs/openapi.json](docs/openapi.json), [web/README.md](web/README.md), [docs/errors.md](docs/errors.md), and the chronological [ADR 0001](docs/adr/0001-go-control-plane.md), [ADR 0002](docs/adr/0002-run-centric-runtime.md), [ADR 0003](docs/adr/0003-run-execution-modes.md), [ADR 0004](docs/adr/0004-plan-delivery-workflow.md), [ADR 0005](docs/adr/0005-operator-steering-queue.md), [ADR 0006](docs/adr/0006-operator-steering-controls.md), [ADR 0007](docs/adr/0007-specialist-skill-context.md), [ADR 0008](docs/adr/0008-sandbox-manifest-boundary.md), [ADR 0009](docs/adr/0009-sandbox-approval-candidate.md), [ADR 0010](docs/adr/0010-disabled-sandbox-lifecycle.md), [ADR 0011](docs/adr/0011-disabled-sandbox-preflight.md), [ADR 0012](docs/adr/0012-simulation-only-sandbox-evidence.md), [ADR 0013](docs/adr/0013-read-only-docker-observation.md), [ADR 0014](docs/adr/0014-deterministic-docker-container-plan.md), [ADR 0015](docs/adr/0015-bounded-docker-write-rehearsal.md), [ADR 0016](docs/adr/0016-recoverable-docker-rehearsal-attempt.md), [ADR 0017](docs/adr/0017-descriptor-sealed-host-input-staging.md), [ADR 0018](docs/adr/0018-durable-pre-stage-host-input-requirement.md), [ADR 0019](docs/adr/0019-daemon-owned-host-input-handoff.md), [ADR 0020](docs/adr/0020-deterministic-runtime-input-projection.md), [ADR 0021](docs/adr/0021-recoverable-runtime-input-application.md), [ADR 0022](docs/adr/0022-retained-runtime-input-resource-lifecycle.md), [ADR 0023](docs/adr/0023-blocked-docker-start-gate-review.md), [ADR 0024](docs/adr/0024-strict-inert-skill-package.md), [ADR 0025](docs/adr/0025-protected-delete-command-guard.md), [ADR 0026](docs/adr/0026-run-execution-profile-selection.md), [ADR 0027](docs/adr/0027-non-authorizing-docker-production-evidence-ledger.md), and [ADR 0028](docs/adr/0028-recoverable-docker-production-evidence-attempts.md) when resuming development after a long conversation. They record current progress, language ownership, run architecture, execution mode, Plan/Delivery and steering invariants, Specialist Skill delivery, Sandbox authority boundaries, API and error contracts, audit notes, verified commands, and the recommended next slice.
20802110

20812111
The latest decisions are [ADR 0029](docs/adr/0029-bounded-linux-read-only-docker-evidence-harness.md), [ADR 0030](docs/adr/0030-immutable-docker-production-evidence-review.md), [ADR 0031](docs/adr/0031-content-addressed-inert-skill-registry.md), [ADR 0032](docs/adr/0032-external-skill-run-context.md), [ADR 0033](docs/adr/0033-pathless-desktop-skill-preview.md), [ADR 0034](docs/adr/0034-embedded-read-first-wails-shell.md), [ADR 0035](docs/adr/0035-desktop-lifecycle-and-event-resumption.md), [ADR 0036](docs/adr/0036-idempotent-controlled-run-creation.md), [ADR 0037](docs/adr/0037-controlled-session-message-submission.md), [ADR 0038](docs/adr/0038-idempotent-run-control-and-bounded-handoff.md), [ADR 0039](docs/adr/0039-model-plan-and-approval-controls.md), [ADR 0040](docs/adr/0040-provider-diff-wake-controls.md), [ADR 0041](docs/adr/0041-explicit-wake-file-apply-and-inert-skill-install.md), [ADR 0042](docs/adr/0042-receipts-explorer-portable-build.md), [ADR 0043](docs/adr/0043-workspace-search-evidence-attachment-receipt-history.md), [ADR 0044](docs/adr/0044-operator-action-center-evidence-inventory-command-palette.md), [ADR 0045](docs/adr/0045-go-issued-editor-system-credentials-bounded-wake-worker.md), [ADR 0046](docs/adr/0046-safe-editor-recovery-provider-generation-worker-health.md), [ADR 0047](docs/adr/0047-read-only-repository-change-set-code-journey.md), [ADR 0048](docs/adr/0048-bounded-diff-verification-code-handoff.md), [ADR 0049](docs/adr/0049-deadlock-livelock-runtime-guards.md), [ADR 0050](docs/adr/0050-repository-history-verification-plan-handoff-export.md), [ADR 0051](docs/adr/0051-exact-commit-verification-association-runner-lifecycle.md), [ADR 0052](docs/adr/0052-conservative-model-context-cumulative-handoff-memory.md), [ADR 0053](docs/adr/0053-commit-preview-handoff-coverage-process-conformance.md), [ADR 0054](docs/adr/0054-file-history-verification-drilldown-runner-exit-evidence.md), [ADR 0055](docs/adr/0055-history-navigation-verification-pagination-runner-runtime-evidence.md), [ADR 0056](docs/adr/0056-exact-commit-comparison-keyset-verification-runner-control-evidence.md), [ADR 0057](docs/adr/0057-comparison-preview-verification-snapshot-runner-timeline-evidence.md), [ADR 0058](docs/adr/0058-paired-comparison-snapshot-receipts-runner-evidence-set.md), and [ADR 0059](docs/adr/0059-paired-navigation-receipt-review-runner-golden-vectors.md).
20822112

2083-
The newest decisions are [ADR 0061](docs/adr/0061-exact-receipt-review-navigation-audit-facts-envelope-golden.md), [ADR 0062](docs/adr/0062-go-owned-analyzer-protocol-rust-fixture-shared-vectors.md), and [ADR 0063](docs/adr/0063-inert-analyzer-registry-zip-inventory-shared-vectors.md).
2113+
The newest decisions are [ADR 0061](docs/adr/0061-exact-receipt-review-navigation-audit-facts-envelope-golden.md), [ADR 0062](docs/adr/0062-go-owned-analyzer-protocol-rust-fixture-shared-vectors.md), [ADR 0063](docs/adr/0063-inert-analyzer-registry-zip-inventory-shared-vectors.md), and [ADR 0064](docs/adr/0064-prayu-brand-and-dual-surface-desktop-shell.md).
20842114

20852115
Windows Desktop D0-A/D0-B 与 D1-R1 至 D1-G13/V12 加 R10 非产品 Runner 回执信封黄金边界的自动化核心已实现,但仍是未签名开发/便携测试壳,不是安装版或完整工作台;Windows 10 实机发布矩阵仍待完成。分阶段方案见 [docs/DESKTOP_PLAN.md](docs/DESKTOP_PLAN.md)。自定义 Skill 已具备严格 `skill_package.v1` 校验、schema v69 本地惰性 Registry、schema v70 CLI Run 选择/最小上下文、schema v71 三端只读来源投影,以及 HTTP/Desktop 显式确认的惰性安装;签名、远程分发和安装时执行仍未开放。详情见 [docs/SKILL_PACKAGE_PLAN.md](docs/SKILL_PACKAGE_PLAN.md)。
20862116

‎cmd/cyberagent-desktop/main_windows.go‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ func (nativeSkillPackagePicker) OpenSkillPackage(ctx context.Context) (string, e
8181
return "", errors.New("desktop lifecycle is unavailable")
8282
}
8383
return runtime.OpenFileDialog(ctx, runtime.OpenDialogOptions{
84-
Title: "Select CyberAgent Skill package",
84+
Title: "Select Prayu Skill package",
8585
Filters: []runtime.FileFilter{
86-
{DisplayName: "CyberAgent Skill package (*.zip)", Pattern: "*.zip"},
86+
{DisplayName: "Prayu Skill package (*.zip)", Pattern: "*.zip"},
8787
},
8888
ShowHiddenFiles: false,
8989
CanCreateDirectories: false,
@@ -145,7 +145,7 @@ func main() {
145145
os.Exit(2)
146146
}
147147
if config.version {
148-
fmt.Fprintf(os.Stdout, "CyberAgent Workbench desktop %s\n", app.Version)
148+
fmt.Fprintf(os.Stdout, "%s desktop %s\n", app.Name, app.Version)
149149
return
150150
}
151151
if err := runDesktop(config); err != nil {
@@ -157,7 +157,7 @@ func main() {
157157
func reportDesktopStartupFailure(err error) {
158158
fmt.Fprintln(os.Stderr, "error:", err)
159159
message, messageErr := syswindows.UTF16PtrFromString(desktopStartupFailureMessage(err))
160-
title, titleErr := syswindows.UTF16PtrFromString("CyberAgent Workbench")
160+
title, titleErr := syswindows.UTF16PtrFromString(app.Name)
161161
if messageErr != nil || titleErr != nil {
162162
return
163163
}
@@ -167,13 +167,13 @@ func reportDesktopStartupFailure(err error) {
167167

168168
func desktopStartupFailureMessage(err error) string {
169169
if errors.Is(err, errWebView2RuntimeRequired) {
170-
return "CyberAgent Workbench requires Microsoft Edge WebView2 Runtime " +
170+
return "Prayu requires Microsoft Edge WebView2 Runtime " +
171171
minimumWebView2RuntimeVersion + " or newer.\r\n\r\n" +
172172
"Install or update it through a trusted Windows software channel, then reopen the app.\r\n\r\n" +
173173
"No download or installation was started."
174174
}
175175
code := apperror.CodeOf(apperror.Normalize(err))
176-
return "CyberAgent Workbench could not start.\r\n\r\nError code: " + string(code) +
176+
return "Prayu could not start.\r\n\r\nError code: " + string(code) +
177177
"\r\n\r\nLocal data was not deleted or reset. Keep it for diagnosis."
178178
}
179179

@@ -345,9 +345,9 @@ func runDesktop(config desktopOptions) error {
345345
}
346346

347347
return wails.Run(&options.App{
348-
Title: "CyberAgent Workbench", Width: 1440, Height: 900, MinWidth: 1024, MinHeight: 680,
348+
Title: app.Name, Width: 1440, Height: 900, MinWidth: 1024, MinHeight: 680,
349349
WindowStartState: options.Normal,
350-
BackgroundColour: options.NewRGB(245, 247, 249),
350+
BackgroundColour: options.NewRGB(23, 22, 20),
351351
AssetServer: &assetserver.Options{
352352
Handler: inProcessAPIHandler{next: controlPlane.Handler()},
353353
},
@@ -401,16 +401,16 @@ func requireWebView2Runtime(probe webView2RuntimeProbe) error {
401401

402402
func desktopWebView2Messages() *windows.Messages {
403403
return &windows.Messages{
404-
InstallationRequired: "Microsoft Edge WebView2 Runtime is required. Use a trusted Windows software channel, then reopen CyberAgent Workbench.",
405-
UpdateRequired: "Microsoft Edge WebView2 Runtime must be updated through a trusted Windows software channel before CyberAgent Workbench can start.",
406-
MissingRequirements: "CyberAgent Workbench prerequisite",
404+
InstallationRequired: "Microsoft Edge WebView2 Runtime is required. Use a trusted Windows software channel, then reopen Prayu.",
405+
UpdateRequired: "Microsoft Edge WebView2 Runtime must be updated through a trusted Windows software channel before Prayu can start.",
406+
MissingRequirements: "Prayu prerequisite",
407407
Webview2NotInstalled: "Microsoft Edge WebView2 Runtime is unavailable.",
408-
Error: "CyberAgent Workbench prerequisite",
408+
Error: "Prayu prerequisite",
409409
FailedToInstall: "Microsoft Edge WebView2 Runtime remains unavailable.",
410410
DownloadPage: "",
411411
PressOKToInstall: "",
412412
ContactAdmin: "Microsoft Edge WebView2 Runtime is required. Contact your administrator or use a trusted Windows software channel.",
413413
InvalidFixedWebview2: "The configured WebView2 Runtime does not meet the required version.",
414-
WebView2ProcessCrash: "The WebView2 process stopped. Reopen CyberAgent Workbench; local data was not reset.",
414+
WebView2ProcessCrash: "The WebView2 process stopped. Reopen Prayu; local data was not reset.",
415415
}
416416
}

0 commit comments

Comments
 (0)