feat: Delicious233→Johnny 全量同步 — E2E/CI/审计/工程规范/文档收敛 - #52
Closed
DeliciousBuding wants to merge 261 commits into
Closed
feat: Delicious233→Johnny 全量同步 — E2E/CI/审计/工程规范/文档收敛#52DeliciousBuding wants to merge 261 commits into
DeliciousBuding wants to merge 261 commits into
Conversation
验证 Edge HTTP server 能把 ProcessExecutor 装配进 Handler,并通过 POST /v1/runs 走进程 executor。
让本地 client smoke 默认验证 Edge 到 Runner mock binary 的上下文输出,并补强复用 Edge 路径。
核心变更:
- 新增 edge-server/internal/adapters/ 包:AgentAdapter 接口 + ClaudeCode/Codex/OpenCode/Orchestrator 四种适配器
- ClaudeCodeAdapter:claude -p --output-format stream-json,NDJSON 协议解析,结构化事件映射
- CodexAdapter:codex exec,JSONL 批量模式(P0),P1 升级到 app-server JSON-RPC
- OpenCodeAdapter:opencode run,批量模式(P0),P1 升级到 serve REST+SSE
- OrchestratorAdapter:ClaudeCode + 编排 system prompt,支持子 Agent 分发
- ProcessExecutor 集成可选 AgentAdapter,结构化 stdout 解析;nil 时回退到原始捕获
- 占位符扩展:{{run.prompt}}、{{agent.id}}、{{agent.model}}、{{run.workdir}}
- CLI flag:--agent-default、--claude-code-path、--codex-path、--opencode-path、--agent-model
- 新增 API:GET /v1/agents、StartRunRequest 扩展 agentId/prompt/model
- 新增事件类型:run.agent.text_delta/block/thinking/tool_call/tool_result/file_change/session_init/result
- 删除 runner/ 目录,Mock 模式由 Edge 内置 MockExecutor 承担
Co-Authored-By: Claude <noreply@anthrop.com>
…de Phase 2 - NDJSON 解析器从 5 种消息类型扩展到 20+ 种,覆盖全部 system 子类型 - 新增 control_protocol.go:can_use_tool 自动审批、Interrupt、SetModel、SetPermissionMode、StopTask - ControlHandler 接入 ProcessExecutor,stdin pipe 创建并传给 adapter - ClaudeCodeAdapter 多轮会话支持:--resume/--continue/--fork-session/--include-partial-messages - OpenCode Phase 2:--format json + 结构化 JSON 事件解析 + session 支持 - 14 个新 BusEvent 常量:compact_boundary, api_retry, task_started/progress/notification 等 - Write/Edit tool_result → file_change 事件自动检测发射 - StartRunRequest 新增 sessionId/continue/fork 字段 - 创建 runnerctx 共享包消除 RunProcessContext 重复定义 - 错误码 UPPER_SNAKE → snake_case,错误响应添加 traceId - ctx 传播修复、孤儿进程修复、ParseStream 错误日志 - parser_ndjson_test.go:24 个 fixture 测试覆盖全部消息类型 - events.md 新增 16 个 run.agent.* 事件类型 - 新建学习报告:15-goose-architecture.md、16-kanna-patterns.md
- tokens.css 完整重写: hex→OKLCH, 3字号+2字重+零阴影, dark/light双主题 - CSS Module 迁移: 8 个文件旧 token→新 OKLCH token, srgb→oklch - Zustand stores: uiStore, connectionStore, threadStore, runStore - App.tsx 重构: useState→Zustand selectors - 新增 5 组件 + 81 测试, 总计 111/111 通过 - ErrorBoundary 内联样式→CSS 变量 - docs/research-synthesis.md: 28 参考仓库源码综合报告
- ChatView 重写: 条件渲染替代 details/summary (CCViewer 模式) - ThinkingBlock + ToolUseBlock: state 驱动, 折叠时内容不在 DOM - DiffCard 内联: 文件头+统计+hunk预览, agenthub:open-diff 事件 - MessageBlock 重构: tool_use 层级嵌套 children (Codex ThreadItem 借鉴) - useChatMessages: tool_result 嵌套进 tool_use.children - 测试更新: 111/111 通过
- src/lib/message-tree.ts: O(n) buildTree, flattenActivePath, DIRECT_PATH/INCLUDE_BRANCHES fork - SiblingSwitch 组件: 分支导航 ← 2/5 → (LibreChat 69行参考) - DiffViewer 组件: unified diff, 折叠文件头, hunk 渲染 (CCViewer 参考) - RunDetail 集成 DiffViewer + agenthub:open-diff 事件监听 - 12 个 message-tree 单元测试, 总计 123/123 通过
- AGENTS.md: 新增当前活跃分支结构和合并规则 - roadmap.md: 重写为当前 M2/M3/M4 进度, 移除旧 feat/client-dev 引用 - client-roadmap.md: 更新分支结构和当前下一步
- searchStore: Zustand store, open/query/results/selectedIndex - SearchDialog: 模态覆盖层, 搜索输入+键盘导航, 结果分组 - App.tsx: 集成 SearchDialog, Ctrl+K 全局触发
- 新增 hubClient.ts: 类型化 Hub Server REST 客户端 (auth/contacts/sessions/edge) - 重写 hubAuth.ts: JWT 令牌管理 (login/logout/refresh/auto-login) - 新增 hubClient.test.ts: 28 个测试覆盖登录、令牌、错误、自动登录等场景 - config.ts: HUB_URL 支持 VITE_HUB_URL 环境变量覆盖 - StatusBar + i18n: 新增 Hub 连接状态显示
- hubWS.ts: 基于 Transport 接口重构,支持 auth-frame 握手 + 重连重认证 - hubEvents.ts (shared): 新增 HUB_EVENTS 常量,对齐 Go ws/frame.go 全量事件类型 - hubEvents.ts (desktop): 向后兼容 re-export + payload 接口定义 - useHubEventStream.ts: React hook 管理 Hub WS 生命周期 + 分类事件状态 - hubWS.test.ts: 20 个测试覆盖 auth/路由/订阅/生命周期/Transport 状态传播
完成 Integration Phase 3 核心桥接,打通三层 E2E 流程: Web → Hub agent.dispatch → Desktop useHubIntegration → Edge /v1/runs → CLI Agent → Edge run.agent.* events → Desktop → Hub stream/done/fail → Web 聊天响应 新增: - taskBridgeStore: Zustand 任务桥接状态管理(taskId↔runId 双向映射) - useHubIntegration: 核心桥接 hook(监听 Hub dispatch、创建 Edge run、转发事件回 Hub) - useDeviceRegistration: 启动时注册 Desktop 设备到 Hub - hubClient Edge 回调方法: ackTask/streamTask/doneTask/failTask - config APP_VERSION 常量 - 全面测试: 22 个用例覆盖调度、映射、流式、错误、并发、取消、清理 验证: pnpm tsc --noEmit 通过,440 个测试全部通过
- IMMessageView: 聊天气泡组件,支持自我/他人/Agent 对齐 - 权限色带(owner=金色/admin=蓝色/member=灰色,参考 LibreChat) - 悬停显示时间戳、Markdown 内容渲染、发送失败重试 - IMMessageInput: 自动缩放输入框,Enter 发送/Shift+Enter 换行 - IMContactList: 会话列表侧边栏,搜索、在线状态、未读角标 - 响应式适配(移动端气泡/平板布局) - i18n 中英文键全覆盖 - 25 个新测试,总测试数 491 全部通过
Collaborator
Author
|
关闭,改用 dev/delicious233→dev/johnny 直接 PR |
DeliciousBuding
added a commit
that referenced
this pull request
Jun 21, 2026
- document-standards.md: 10层文档分层/命名格式/路线图/禁止事项 - branch-governance.md: 5分支状态(ahead/behind)/PR #52/合并规则 - 遵守三人共享规则: AGENTS.md 不动,新增规范写 docs/
DeliciousBuding
added a commit
that referenced
this pull request
Aug 11, 2026
- document-standards.md: 10层文档分层/命名格式/路线图/禁止事项 - branch-governance.md: 5分支状态(ahead/behind)/PR #52/合并规则 - 遵守三人共享规则: AGENTS.md 不动,新增规范写 docs/
This was referenced Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
同步内容
Edge Server
Hub Server
Desktop
文档
冲突解决
全部 54 个冲突为 add/add (同文件独立创建),差异仅导入路径
server-hub→hub-server。采用 dev/delicious233 版本以统一模块名。
Test Plan