Skip to content

refactor: introduce composable harness architecture - #1

Merged
oyjt merged 10 commits into
mainfrom
refactor/harness-architecture
Aug 23, 2026
Merged

refactor: introduce composable harness architecture#1
oyjt merged 10 commits into
mainfrom
refactor/harness-architecture

Conversation

@oyjt

@oyjt oyjt commented Aug 23, 2026

Copy link
Copy Markdown
Owner

背景

参考 deepseek-ai/deepseek-harness 的插件化、capability seam、可逆注册、事件驱动与执行前策略机制,对 Agent Workbench 开始架构升级。

本 PR 不复制 DeepSeek Harness 的完整 Cordis/agent loop,而是保留 Workbench 现有的 Runtime Adapter 控制平面定位,先建立轻量 harness 内核,作为后续拆分 src/App.tsxserver/index.mjs 的稳定边界。

本次改动

  • 新增前端/共享 harness contracts:
    • AgentHarness
    • CapabilityRegistry
    • HarnessEventBus
    • reversible plugin registration
    • risk policy seam
  • 新增 server harness:
    • capability registry
    • plugin lifecycle
    • allow / ask / deny policy
    • guarded capability execution pipeline
    • capability lifecycle events
  • 增加 Node 原生测试,覆盖:
    • capability 可逆注册
    • plugin 卸载清理
    • medium-risk 审批后执行
  • 增加 pnpm test / pnpm verify
  • 新增 docs/architecture/harness-refactor.md,明确迁移目标、边界和分阶段方案

后续迁移顺序

  1. server/index.mjs:db/schema → repositories → events → approval → connectors/runtime → HTTP/SSE
  2. 将 CLI/MCP 接入统一 capability/policy/approval pipeline
  3. src/App.tsx:workflows → tasks/runs → approvals → agents → connectors/skills → knowledge/artifacts
  4. 增加 capability scope / profile / loadout
  5. 让 durable run events 成为运行控制台、审计、恢复和回放的事实源

设计取舍

  • 保留 Runtime Adapter,不在 Workbench 内重写成熟 coding agent 的模型循环。
  • 不引入完整 Cordis,控制当前项目复杂度。
  • 先创建 seam 与测试,再逐模块迁移,避免大爆炸式重写和功能回退。

@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c6911f45-de77-473c-846f-0aee3a0a84ca

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@oyjt
oyjt merged commit 4c1a6e2 into main Aug 23, 2026
2 checks passed
@oyjt
oyjt deleted the refactor/harness-architecture branch August 23, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant