Files
beaver_project/docs/product-discovery/beaver/product-prd.html
steven_li 8aeb97a5fc feat(app): 移除内置agents并添加CORS支持和技能上传优化
移除了agents/registry.json中的所有内置agents配置,将agents数组清空。
为web应用添加了CORS中间件支持,允许指定的前端地址跨域访问。
重构了技能上传功能,增加了LLM重写机制,自动规范化上传的技能格式。
新增了工具名称提取逻辑,从技能正文中自动识别Required Tools段落。
更新了技能学习候选者和草稿的载荷结构,添加评估报告统计信息。
修改了意图路由技能的说明,改进任务状态管理逻辑。
2026-06-12 13:25:20 +08:00

1450 lines
53 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Beaver 产品 PRD 与模块路线图</title>
<style>
:root {
--bg: #f6f4f1;
--paper: #fffdf9;
--ink: #171412;
--muted: #665f59;
--line: #ddd6cf;
--soft: #eee9e3;
--navy: #18324a;
--blue: #2f6f9f;
--green: #527866;
--amber: #b7791f;
--red: #ad4d4d;
--shadow: 0 16px 42px rgba(28, 24, 20, 0.08);
--radius: 8px;
--max: 1180px;
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
overflow-x: hidden;
background: var(--bg);
color: var(--ink);
font-family: Inter, "Public Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
line-height: 1.65;
letter-spacing: 0;
}
a {
color: inherit;
text-decoration: none;
}
.topbar {
position: sticky;
top: 0;
z-index: 20;
border-bottom: 1px solid rgba(221, 214, 207, 0.9);
background: rgba(246, 244, 241, 0.94);
backdrop-filter: blur(14px);
}
.topbar-inner {
width: min(var(--max), calc(100% - 32px));
min-height: 64px;
margin: 0 auto;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
}
.brand {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.brand-mark {
width: 34px;
height: 34px;
display: grid;
place-items: center;
border-radius: 8px;
background: var(--navy);
color: #fff;
font-weight: 820;
}
.brand strong {
display: block;
line-height: 1.1;
white-space: nowrap;
}
.brand span {
display: block;
color: var(--muted);
font-size: 12px;
line-height: 1.2;
}
.nav {
display: flex;
justify-content: flex-end;
flex-wrap: wrap;
gap: 6px;
color: var(--muted);
font-size: 13px;
}
.nav a {
min-height: 36px;
display: inline-flex;
align-items: center;
padding: 0 9px;
border-radius: 8px;
}
.nav a:hover {
background: var(--soft);
color: var(--ink);
}
.hero,
section,
.footer {
width: min(var(--max), calc(100% - 32px));
margin: 0 auto;
}
.hero {
padding: 72px 0 44px;
display: grid;
grid-template-columns: minmax(0, 0.98fr) minmax(360px, 1.02fr);
gap: 34px;
align-items: stretch;
}
.hero > * {
min-width: 0;
}
.eyebrow {
display: inline-flex;
align-items: center;
gap: 8px;
margin-bottom: 18px;
color: var(--navy);
font-size: 12px;
font-weight: 800;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.eyebrow::before {
content: "";
width: 28px;
height: 2px;
background: var(--blue);
}
h1,
h2,
h3,
h4 {
margin: 0;
line-height: 1.16;
letter-spacing: 0;
}
h1 {
max-width: 760px;
font-family: Georgia, "Times New Roman", "Songti SC", serif;
font-size: clamp(42px, 6vw, 74px);
font-weight: 680;
overflow-wrap: anywhere;
}
h2 {
font-size: clamp(28px, 4vw, 42px);
font-weight: 780;
}
h3 {
font-size: 20px;
font-weight: 780;
}
h4 {
font-size: 15px;
font-weight: 820;
}
p {
margin: 0;
}
ul,
ol {
margin: 12px 0 0;
padding-left: 20px;
}
li {
margin: 5px 0;
}
code {
padding: 1px 5px;
border: 1px solid var(--line);
border-radius: 6px;
background: #fbf8f3;
color: #3b332f;
font-family: "SFMono-Regular", Consolas, monospace;
font-size: 0.92em;
}
.lead {
margin-top: 22px;
max-width: 760px;
color: #3f3834;
font-size: 19px;
overflow-wrap: anywhere;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin-top: 28px;
}
.button {
min-height: 44px;
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 15px;
border: 1px solid var(--line);
border-radius: 8px;
background: var(--paper);
color: var(--ink);
font-size: 14px;
font-weight: 760;
}
.button.primary {
border-color: var(--navy);
background: var(--navy);
color: #fff;
}
.hero-panel {
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper);
box-shadow: var(--shadow);
padding: 22px;
}
.hero-matrix {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px;
}
.hero-cell {
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fbf8f3;
padding: 16px;
}
.hero-cell b {
display: block;
font-size: 28px;
line-height: 1;
margin: 6px 0;
}
.hero-cell span {
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
section {
padding: 56px 0;
border-top: 1px solid rgba(221, 214, 207, 0.85);
}
.section-head {
display: grid;
grid-template-columns: minmax(0, 0.72fr) minmax(280px, 0.28fr);
gap: 24px;
align-items: end;
margin-bottom: 24px;
}
.section-head p {
color: var(--muted);
font-size: 16px;
overflow-wrap: anywhere;
}
.grid-2,
.grid-3,
.grid-4 {
display: grid;
gap: 14px;
}
.grid-2 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
min-width: 0;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper);
padding: 20px;
}
.card p,
.card li {
color: var(--muted);
overflow-wrap: anywhere;
}
.card p {
margin-top: 10px;
}
.accent-blue {
border-top: 4px solid var(--blue);
}
.accent-green {
border-top: 4px solid var(--green);
}
.accent-amber {
border-top: 4px solid var(--amber);
}
.accent-red {
border-top: 4px solid var(--red);
}
.tag {
display: inline-flex;
align-items: center;
min-height: 26px;
padding: 0 9px;
border-radius: 999px;
margin-bottom: 10px;
background: var(--soft);
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.tag.blue {
background: #e4edf4;
color: var(--navy);
}
.tag.green {
background: #e7efe9;
color: var(--green);
}
.tag.amber {
background: #f3ead8;
color: #805514;
}
.quote {
border-left: 4px solid var(--navy);
border-radius: 0 8px 8px 0;
background: var(--paper);
padding: 18px 20px;
color: #302a26;
font-family: Georgia, "Times New Roman", "Songti SC", serif;
font-size: 22px;
line-height: 1.55;
overflow-wrap: anywhere;
}
.table-wrap {
overflow-x: auto;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper);
}
table {
width: 100%;
min-width: 940px;
border-collapse: collapse;
font-size: 14px;
}
th,
td {
border-bottom: 1px solid var(--line);
padding: 13px 14px;
text-align: left;
vertical-align: top;
overflow-wrap: anywhere;
}
th {
background: #eee9e3;
color: var(--muted);
font-size: 12px;
font-weight: 800;
letter-spacing: 0.06em;
text-transform: uppercase;
}
tr:last-child td {
border-bottom: 0;
}
.module {
display: grid;
gap: 14px;
padding: 22px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper);
box-shadow: var(--shadow);
margin-bottom: 18px;
}
.module-head {
display: grid;
grid-template-columns: minmax(0, 0.8fr) minmax(260px, 0.2fr);
gap: 16px;
align-items: start;
}
.module-meta {
display: grid;
gap: 8px;
color: var(--muted);
font-size: 13px;
}
.module-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
}
.mini {
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fbf8f3;
padding: 16px;
}
.mini p,
.mini li {
color: var(--muted);
}
.timeline {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 12px;
}
.phase {
border: 1px solid var(--line);
border-radius: var(--radius);
background: var(--paper);
padding: 18px;
}
.source-list {
columns: 2;
column-gap: 26px;
margin: 0;
padding-left: 18px;
color: var(--muted);
font-size: 13px;
}
.source-list a {
color: var(--navy);
text-decoration: underline;
text-underline-offset: 3px;
}
.footer {
padding: 36px 0 56px;
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 13px;
}
.mobile-break {
display: none;
}
@media (max-width: 1020px) {
.hero,
.section-head,
.grid-2,
.module-head,
.module-grid {
grid-template-columns: 1fr;
}
.grid-3,
.grid-4,
.timeline {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (max-width: 680px) {
.topbar-inner {
width: auto;
margin-left: 16px;
margin-right: 16px;
flex-direction: column;
align-items: flex-start;
padding: 12px 0;
}
.nav {
width: 100%;
overflow-x: auto;
justify-content: flex-start;
flex-wrap: nowrap;
}
.nav a {
flex: 0 0 auto;
}
.hero,
section,
.footer {
width: auto;
margin-left: 16px;
margin-right: 16px;
}
.hero {
display: block;
padding-top: 44px;
}
h1 {
font-size: 34px;
overflow-wrap: anywhere;
word-break: break-all;
}
h2 {
font-size: 28px;
}
.actions {
display: grid;
grid-template-columns: 1fr;
}
.button {
width: 100%;
}
.lead {
max-width: 330px;
font-size: 17px;
}
.lead,
.section-head p,
.card p,
.card li,
.mini p,
.mini li,
.phase li,
td,
th {
overflow-wrap: anywhere;
word-break: break-all;
white-space: normal;
}
.card,
.module,
.mini,
.phase {
max-width: 100%;
overflow: hidden;
}
.quote {
font-size: 18px;
}
.hero-panel {
display: none;
}
.hero-matrix,
.grid-3,
.grid-4,
.timeline {
grid-template-columns: 1fr;
}
.grid-2,
.grid-3,
.grid-4,
.module-grid,
.timeline,
.hero-matrix {
display: block;
}
.card,
.mini,
.phase,
.hero-cell {
width: 100%;
margin-bottom: 14px;
}
.source-list {
columns: 1;
}
.mobile-break {
display: block;
}
}
@media print {
body {
background: #fff;
}
.topbar,
.actions {
display: none;
}
.hero,
section,
.footer {
width: 100%;
}
.card,
.module,
.phase,
.table-wrap {
break-inside: avoid;
box-shadow: none;
}
}
</style>
</head>
<body>
<header class="topbar">
<div class="topbar-inner">
<a class="brand" href="#top" aria-label="返回顶部">
<span class="brand-mark">B</span>
<span><strong>Beaver Agent Sandbox</strong><span>产品 PRD · 模块路线图 · 测试场景</span></span>
</a>
<nav class="nav" aria-label="页面导航">
<a href="index.html">战略页</a>
<a href="#prd">PRD</a>
<a href="#roadmap">模块路线</a>
<a href="#modules">模块做法</a>
<a href="#tests">测试矩阵</a>
<a href="#release">发布范围</a>
<a href="#sources">代码依据</a>
</nav>
</div>
</header>
<main id="top">
<div class="hero">
<div>
<div class="eyebrow">Product Requirement Document</div>
<h1>Beaver<span class="mobile-break"></span>从聊天到<span class="mobile-break"></span>可验收工作的<span class="mobile-break"></span>产品 PRD</h1>
<p class="lead">这页把 Beaver 当前代码里的能力,整理成产品团队、研发团队、测试团队都能对齐的 PRD。重点不是列功能而是说明每个模块为什么要做、要做成什么样、怎么验收。</p>
<div class="actions">
<a class="button primary" href="#modules">看模块拆解</a>
<a class="button" href="#tests">看测试场景</a>
<a class="button" href="#sources">看代码依据</a>
</div>
</div>
<aside class="hero-panel" aria-label="PRD 摘要">
<div class="hero-matrix">
<div class="hero-cell"><span>产品主线</span><b>任务</b>从请求到验收</div>
<div class="hero-cell"><span>用户价值</span><b>证据</b>知道 Agent 做了什么</div>
<div class="hero-cell"><span>增长杠杆</span><b>技能</b>把好方法复用</div>
<div class="hero-cell"><span>上线前提</span><b>治理</b>私有实例和可控工具</div>
</div>
</aside>
</div>
<section id="prd">
<div class="section-head">
<div>
<div class="eyebrow">Create PRD</div>
<h2>产品 PRD</h2>
</div>
<p>按 create-prd 的 8 段结构组织:摘要、联系人、背景、目标、市场、价值主张、方案、发布范围。</p>
</div>
<div class="grid-2">
<article class="card accent-blue">
<span class="tag blue">1. Summary</span>
<h3>一句话定义</h3>
<p>Beaver 是一个可私有部署的企业 Agent 工作台。它把普通聊天升级为可追踪任务,让用户能上传文件、调用工具、查看证据、验收结果,并把成功过程沉淀为技能和记忆。</p>
</article>
<article class="card accent-green">
<span class="tag green">2. Contacts</span>
<h3>关键角色</h3>
<ul>
<li>产品负责人:定义首批场景、试点问题和模块优先级。</li>
<li>工程负责人:保证实例、任务、工具、技能和连接器架构可落地。</li>
<li>设计负责人:保证工作台、任务详情、技能审核和配置体验可理解。</li>
<li>运维负责人:保证部署、路由、日志、备份和故障恢复可执行。</li>
<li>安全负责人:定义工具、连接器、文件、记忆和技能发布边界。</li>
</ul>
</article>
</div>
<div class="grid-2" style="margin-top: 14px;">
<article class="card accent-amber">
<span class="tag amber">3. Background</span>
<h3>为什么现在做</h3>
<p>企业已经从“试一下 AI 聊天”进入“让 AI 完成真实工作”的阶段。真实工作需要任务状态、文件、工具、证据、验收、复盘和可复用经验。Beaver 当前代码已经具备 Chat、Task、Files、Skills、MCP、Cron、Agents、Connectors、Status、Logs 等基础产品面,可以进入产品化梳理。</p>
</article>
<article class="card accent-red">
<span class="tag">4. Objective</span>
<h3>产品目标</h3>
<p>让试点团队在私有实例中完成可验收、可追踪、可复用的 Agent 工作,并让运营者能控制模型、工具、连接器和实例状态。</p>
<ul>
<li>首个用户会话内完成一次可验收任务。</li>
<li>30 天内形成 30 个被接受的任务结果。</li>
<li>核心任务 90% 具备可读证据。</li>
<li>至少 5 个技能候选进入草稿,至少 3 个技能被复用。</li>
</ul>
</article>
</div>
<div class="grid-3" style="margin-top: 14px;">
<article class="card">
<span class="tag blue">5. Market Segments</span>
<h3>目标用户</h3>
<p>第一批不是泛用户,而是有重复知识工作、文件输入、工具调用、结果验收和流程复用需求的团队。</p>
<ul>
<li>项目交付团队:报告、纪要、跟进、复盘。</li>
<li>运营团队:周期汇总、监控、通知、异常处理。</li>
<li>技术支持团队:排查、日志、知识库、回复草稿。</li>
<li>AI 平台团队:私有部署、工具治理、技能沉淀。</li>
</ul>
</article>
<article class="card">
<span class="tag green">6. Value Props</span>
<h3>价值主张</h3>
<ul>
<li>给终端用户:少反复解释,能看到任务进度和结果证据。</li>
<li>给团队负责人:知道 AI 交付是否可靠,能沉淀好的方法。</li>
<li>给平台管理员:模型、工具、连接器、实例状态都可管理。</li>
<li>给安全负责人:高风险动作可以通过策略、证据和审核控制。</li>
</ul>
</article>
<article class="card">
<span class="tag amber">7. Solution</span>
<h3>方案结构</h3>
<p>产品由 8 个模块组成控制面与实例、Chat/Task、文件产物、工具/MCP、技能学习、Agent Team、连接器/计划任务、运营治理。它们共同服务同一条闭环:请求、执行、证据、验收、复用。</p>
</article>
</div>
</section>
<section id="roadmap">
<div class="section-head">
<div>
<div class="eyebrow">Outcome Roadmap</div>
<h2>模块路线图:先说明需要什么模块</h2>
</div>
<p>按 outcome-roadmap 的方式,把“要做的功能”改写成“用户和业务要达成的结果”。</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>阶段</th>
<th>模块</th>
<th>当前代码依据</th>
<th>Outcome Statement</th>
<th>关键指标</th>
<th>依赖</th>
</tr>
</thead>
<tbody>
<tr>
<td>Phase 1<br>完成核心闭环</td>
<td>控制面与实例</td>
<td><code>auth-portal</code><code>authz-service</code><code>deploy-control</code><code>router-proxy</code><code>app-instance</code></td>
<td>让试点用户可以稳定进入自己的私有 Beaver 实例,从而减少环境配置和部署阻塞。</td>
<td>新实例可用率、部署耗时、登录成功率、配置恢复率</td>
<td>Docker、路由、实例健康检查、Provider 配置</td>
</tr>
<tr>
<td>Phase 1<br>完成核心闭环</td>
<td>Chat/Task 工作台</td>
<td><code>/</code><code>/tasks</code><code>/tasks/[taskId]</code><code>AgentService</code><code>TaskService</code></td>
<td>让用户能把一次自然语言请求推进到可验收任务,从而证明 Beaver 不是聊天框,而是工作系统。</td>
<td>首个可验收任务耗时、任务完成率、接受率、修订次数</td>
<td>WebSocket、任务分类、时间线、反馈与验收</td>
</tr>
<tr>
<td>Phase 1<br>完成核心闭环</td>
<td>文件与产物</td>
<td><code>/files</code><code>UserFileService</code><code>workspace</code> APIs、文件工具</td>
<td>让用户和 Agent 能围绕同一份文件工作,从而让任务结果有上下文、有产物、可下载。</td>
<td>上传成功率、预览成功率、任务引用文件比例、文件错误率</td>
<td>文件存储、路径安全、预览、下载、删除</td>
</tr>
<tr>
<td>Phase 2<br>增强执行能力</td>
<td>工具与 MCP</td>
<td><code>/mcp</code><code>ToolRegistry</code><code>MCPConnectionManager</code><code>/api/mcp/tools</code></td>
<td>让管理员能接入、测试和治理工具,从而让 Agent 可以完成真实系统动作。</td>
<td>工具测试成功率、工具调用证据覆盖率、失败可诊断率</td>
<td>MCP server 配置、AuthZ scopes、工具策略</td>
</tr>
<tr>
<td>Phase 2<br>增强复用能力</td>
<td>技能学习与市场</td>
<td><code>/skills</code><code>/marketplace</code><code>SkillLearningWorker</code>、候选/草稿/审核/发布 API</td>
<td>让被接受的好任务变成可复用技能,从而降低重复任务成本并形成团队能力库。</td>
<td>候选数、草稿通过率、发布数、复用次数、回滚次数</td>
<td>运行记忆、安全检查、评测报告、人审流程</td>
</tr>
<tr>
<td>Phase 2<br>增强复杂任务</td>
<td>Agent Team</td>
<td><code>/agents</code><code>coordinator</code><code>ExecutionGraph</code><code>TaskExecutionPlanner</code></td>
<td>让复杂任务可以拆分给多个子 Agent 执行,从而提升多步骤工作质量和可解释性。</td>
<td>复杂任务完成率、子任务失败可见率、最终合成满意度</td>
<td>计划器、子 Agent 配置、执行图、证据汇总</td>
</tr>
<tr>
<td>Phase 3<br>主动工作</td>
<td>连接器、渠道、计划任务</td>
<td><code>/outlook</code><code>/notifications</code><code>/cron</code><code>ChannelRuntime</code><code>CronService</code></td>
<td>让 Beaver 能在合适时间或外部事件触发工作,从而从被动问答变成主动运营助手。</td>
<td>计划任务成功率、通知参与率、连接器恢复率、外部动作误触发数</td>
<td>渠道配置、连接器凭证、去重、回调路由、外部写入策略</td>
</tr>
<tr>
<td>Phase 3<br>上线治理</td>
<td>设置、状态、日志、运维</td>
<td><code>/settings</code><code>/status</code><code>/logs</code><code>/api/status</code><code>/api/runtime/restart</code></td>
<td>让管理员能发现并恢复模型、工具、渠道和运行时问题,从而降低试点支持成本。</td>
<td>故障定位时间、配置成功率、重启成功率、日志可用率</td>
<td>Provider 配置、通道配置、健康检查、日志投影</td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="modules">
<div class="section-head">
<div>
<div class="eyebrow">Job Stories + WWA</div>
<h2>模块怎么做,以及为什么这么做</h2>
</div>
<p>每个模块用 Job Story 说明用户情境,用 WWA 说明 Why / What / Acceptance用测试场景说明怎么验收。</p>
</div>
<article class="module">
<div class="module-head">
<div>
<span class="tag blue">模块 01</span>
<h3>控制面与私有实例</h3>
<p>覆盖注册、登录、实例创建、Provider 配置、路由、实例健康。现有代码和部署结构包括 auth portal、authz service、deploy-control、router-proxy、app-instance。</p>
</div>
<div class="module-meta">
<span>核心页面登录、注册、handoff、状态</span>
<span>核心接口:<code>/api/auth/*</code><code>/api/status</code></span>
<span>关键风险:实例不可达、配置错误、控制面暴露</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当我第一次试用 Beaver 时,我想注册后直接进入自己的工作实例,所以我能在不理解底层部署的情况下开始第一项 Agent 工作。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>私有实例是 Beaver 的信任基础。用户必须先进入稳定、隔离、可恢复的环境。</p>
<p><strong>What</strong>提供注册、登录、handoff、Provider 配置、实例状态展示和失败恢复提示。</p>
<ul>
<li>用户能完成注册并进入实例。</li>
<li>Provider 未配置时有清晰提示。</li>
<li>实例健康状态能被用户或管理员看到。</li>
<li>控制面服务不作为公共产品入口暴露。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>新用户注册后得到 token 和 handoff URL。</li>
<li>实例没有 Provider 时,发送任务前出现可理解错误。</li>
<li>访问 <code>/api/ping</code><code>/api/status</code> 返回健康数据。</li>
<li>错误 token 访问受保护接口返回 401。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag blue">模块 02</span>
<h3>Chat / Task 工作台</h3>
<p>这是产品主线用户发起请求系统判断是否进入任务模式Agent 执行,用户查看时间线、证据、产物,并选择接受、修订或放弃。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/</code><code>/tasks</code><code>/tasks/[taskId]</code></span>
<span>核心服务:<code>AgentService</code><code>TaskService</code></span>
<span>关键测试active task、websocket、task feedback</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当我给 Agent 一个需要持续完成的工作时,我想看到它变成一个有状态的任务,所以我能知道它做到哪一步、产出了什么、是否值得接受。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>聊天只能回答任务才能交付。Beaver 必须把“会话”升级为“工作单”。</p>
<p><strong>What</strong>支持发送消息和附件、任务识别、实时进度、任务列表、任务详情、验收与修订。</p>
<ul>
<li>任务可从聊天、列表、详情页互相跳转。</li>
<li>用户能接受、要求修订或放弃结果。</li>
<li>修订保留原任务上下文。</li>
<li>任务状态和时间线在桌面和移动端可读。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>发送任务型请求后创建 active task。</li>
<li>WebSocket 推送思考、工具、产物和完成事件。</li>
<li>点击接受后任务状态持久化。</li>
<li>输入修订意见后同一任务追加新 run。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag green">模块 03</span>
<h3>文件与产物工作区</h3>
<p>支持用户上传、浏览、预览、下载、删除文件,也支持 Agent 在受控工作区中读取和生成产物。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/files</code></span>
<span>核心服务:<code>UserFileService</code>、workspace files API</span>
<span>关键测试user file service、web files API、filesystem tools</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当我的任务依赖文档、图片或数据文件时,我想把文件放进 Beaver并在结果里看到它如何被使用所以我能信任任务产出。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>企业知识工作通常围绕文件展开。没有文件边界Agent 工作就难以落地。</p>
<p><strong>What</strong>提供目录、上传、预览、下载、删除和新建文件夹能力Agent 工具只能在允许路径内操作。</p>
<ul>
<li>根目录和多级目录可浏览。</li>
<li>Markdown、文本、图片可预览。</li>
<li>上传失败有可理解错误。</li>
<li>非法路径不能逃逸工作区。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>上传文件后列表立即出现。</li>
<li>打开 Markdown 文件显示预览。</li>
<li>下载文件内容与上传内容一致。</li>
<li>删除目录或文件后刷新仍不存在。</li>
<li>路径穿越请求被拒绝。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag green">模块 04</span>
<h3>工具与 MCP 管理</h3>
<p>Beaver 通过内置工具和 MCP 工具让 Agent 具备真实动作能力。产品上需要让管理员看懂工具来源、连接状态、权限和测试结果。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/mcp</code></span>
<span>核心接口:<code>/api/mcp/servers</code><code>/api/mcp/tools</code></span>
<span>关键测试marketplace and mcp、mcp tools server、tool assembler</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当我准备让 Agent 调用外部工具时,我想先测试连接并看清权限范围,所以我能避免把不可靠或高风险工具交给 Agent。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>工具是 Agent 的行动边界,也是最大的安全风险。</p>
<p><strong>What</strong>支持 MCP server 的新增、编辑、删除、测试、工具发现、AuthZ scope 预览和本地/远程分类。</p>
<ul>
<li>管理员能添加 stdio 或 remote server。</li>
<li>测试失败返回具体原因。</li>
<li>工具列表显示 server 来源。</li>
<li>需要授权的工具显示权限预览。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>新增 server 后出现在 MCP 列表。</li>
<li>测试可用 server 返回 ok。</li>
<li>删除 server 后工具列表同步减少。</li>
<li>无效 JSON 配置在前端被拦截。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag amber">模块 05</span>
<h3>技能学习、审核与市场</h3>
<p>Beaver 的复用壁垒来自技能。已接受任务可以形成候选,候选生成草稿,草稿经过安全、评测、人审后发布,后续任务再调用。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/skills</code><code>/marketplace</code></span>
<span>核心服务:<code>SkillLearningWorker</code><code>SkillSpecStore</code></span>
<span>关键测试skill learning pipeline、safety、eval、web api</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当一个任务结果被证明有用时,我想把它转成可审核的技能,所以团队以后不用从零开始重复同样方法。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>没有技能复用Beaver 只是一次性执行工具有技能复用Beaver 才能积累团队能力。</p>
<p><strong>What</strong>提供已发布技能、候选、草稿、安全报告、评测报告、提交、批准、拒绝、发布、禁用、回滚、上传和市场安装。</p>
<ul>
<li>候选能基于运行证据生成。</li>
<li>高风险草稿不能直接发布。</li>
<li>发布需要人审状态。</li>
<li>技能版本可查看、下载、回滚。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>运行学习任务后产生候选或明确说明无候选。</li>
<li>候选生成草稿后出现在草稿区。</li>
<li>安全检查失败时提交按钮不可用。</li>
<li>批准并发布后技能进入已发布列表。</li>
<li>回滚后当前版本发生变化。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag amber">模块 06</span>
<h3>Agent Team 与复杂任务执行</h3>
<p>复杂任务需要拆分为 sequence、parallel 或 DAG。Beaver 当前有 coordinator、planner、registry、execution graph 和 subagent 管理能力。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/agents</code></span>
<span>核心模块:<code>coordinator</code><code>TaskExecutionPlanner</code></span>
<span>关键测试agent team、task execution planner、agent registry resolver</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当一个任务需要调研、分析、生成和审核多步协作时,我想让 Beaver 自动拆分并展示每个子任务结果,所以我能判断最终答案是否可靠。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>复杂工作无法靠单轮问答稳定完成。多 Agent 执行能提高分工质量,但必须可解释。</p>
<p><strong>What</strong>支持 agent/subagent 管理、任务计划、执行图、子任务结果、失败状态和最终合成。</p>
<ul>
<li>管理员能创建和编辑本地 subagent。</li>
<li>任务可生成可读执行计划。</li>
<li>子任务失败不会丢失部分证据。</li>
<li>最终答案能引用或总结子任务输出。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>创建 subagent 后刷新仍存在。</li>
<li>复杂任务生成 sequence/parallel/DAG 计划。</li>
<li>某节点失败时任务时间线显示失败节点。</li>
<li>最终合成包含子任务摘要。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag blue">模块 07</span>
<h3>连接器、渠道、计划任务与通知</h3>
<p>这一组能力让 Beaver 从“用户问了才做”变成“到时间或有外部事件时主动做”。现有页面覆盖 Outlook、Status 渠道配置、Notifications、Cron。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/outlook</code><code>/notifications</code><code>/tasks?tab=scheduled</code></span>
<span>核心服务:<code>CronService</code><code>ChannelRuntime</code></span>
<span>关键测试cron service、channel runtime、connector APIs</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当我有固定周期的汇总或外部消息触发的工作时,我想让 Beaver 自动运行并通知我审核,所以我不用每天手动发起同样任务。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>企业工作有大量周期任务和外部事件。主动触发是 Agent 从助手变成运营系统的关键。</p>
<p><strong>What</strong>支持计划任务创建、开关、删除、立即运行通知列表和详情Outlook 连接、邮箱、日历、消息详情,渠道连接和验证。</p>
<ul>
<li>计划任务可以被暂停和恢复。</li>
<li>计划输出可以进入正常任务验收流。</li>
<li>连接器失败显示可恢复错误。</li>
<li>外部写入必须受策略控制。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>创建 every/cron/at 三类计划任务。</li>
<li>点击 run now 产生一次 scheduled run。</li>
<li>通知详情页能 engage 到任务上下文。</li>
<li>Outlook 配置测试失败时显示错误。</li>
<li>重复外部消息被 dedupe store 去重。</li>
</ul>
</div>
</div>
</article>
<article class="module">
<div class="module-head">
<div>
<span class="tag red">模块 08</span>
<h3>设置、状态、日志与运维治理</h3>
<p>上线前必须让运营者知道系统是不是健康、模型是否可用、渠道是否正常、日志是否能解释问题,并能安全重启运行时。</p>
</div>
<div class="module-meta">
<span>核心页面:<code>/settings</code><code>/status</code><code>/logs</code></span>
<span>核心接口:<code>/api/status</code><code>/api/runtime/restart</code></span>
<span>关键测试config loader、debug chat logs、process projection</span>
</div>
</div>
<div class="module-grid">
<div class="mini">
<h4>Job Story</h4>
<p>当 Agent 任务失败或连接器不可用时,我想快速看到配置、运行状态和日志,所以我能恢复服务而不是猜问题在哪里。</p>
</div>
<div class="mini">
<h4>WWA</h4>
<p><strong>Why</strong>私有部署产品的体验不只在用户界面,也在故障恢复速度。</p>
<p><strong>What</strong>提供 Provider 配置、Agent 参数、渠道配置、连接器状态、运行时重启、系统状态、聊天日志、事件投影。</p>
<ul>
<li>Provider 保存后状态刷新。</li>
<li>运行时重启需要确认。</li>
<li>日志能按 session/run 展开。</li>
<li>错误状态能给出下一步处理提示。</li>
</ul>
</div>
<div class="mini">
<h4>测试场景</h4>
<ul>
<li>保存 Provider 配置后 <code>/api/status</code> 反映新状态。</li>
<li>重启按钮触发 <code>/api/runtime/restart</code> 并显示进行中。</li>
<li>日志页展示最近 run 和事件。</li>
<li>长配置值不撑破页面。</li>
</ul>
</div>
</div>
</article>
</section>
<section id="tests">
<div class="section-head">
<div>
<div class="eyebrow">Test Scenarios</div>
<h2>测试矩阵:每个模块怎么证明满足需求</h2>
</div>
<p>这里按 test-scenarios 的结构组织:测试目标、初始条件、用户角色、动作、预期结果。</p>
</div>
<div class="table-wrap">
<table>
<thead>
<tr>
<th>模块</th>
<th>测试目标</th>
<th>初始条件</th>
<th>用户角色</th>
<th>关键步骤</th>
<th>预期结果</th>
<th>现有测试依据</th>
</tr>
</thead>
<tbody>
<tr>
<td>控制面与实例</td>
<td>验证用户能进入私有实例并看到健康状态。</td>
<td>部署完成;实例容器运行;无或有 Provider 配置。</td>
<td>新用户、管理员</td>
<td>注册、登录、consume handoff、打开 status、调用 ping。</td>
<td>登录成功;错误 token 被拒绝Provider 缺失时提示清楚;健康接口返回正常。</td>
<td><code>test_config_loader.py</code>、web auth routes</td>
</tr>
<tr>
<td>Chat/Task</td>
<td>验证用户请求能转为可验收任务。</td>
<td>用户已登录Provider 可用WebSocket 可连接。</td>
<td>普通用户</td>
<td>发送任务请求、等待 run、打开任务详情、接受或修订。</td>
<td>任务生成;时间线有事件;接受状态持久化;修订继续同一任务。</td>
<td><code>test_active_task_api.py</code><code>test_task_mode_feedback.py</code><code>test_websocket_chat.py</code></td>
</tr>
<tr>
<td>文件与产物</td>
<td>验证用户文件能安全进入工作区并被预览。</td>
<td>用户已登录;工作区为空或有样例文件。</td>
<td>普通用户、Agent</td>
<td>上传、浏览、预览、下载、删除、尝试非法路径。</td>
<td>文件操作成功;内容一致;非法路径失败;二进制/大文件有保护。</td>
<td><code>test_user_file_service.py</code><code>test_web_files_api.py</code><code>test_filesystem_tools.py</code></td>
</tr>
<tr>
<td>工具与 MCP</td>
<td>验证工具接入可配置、可测试、可发现。</td>
<td>至少一个本地或远程 MCP server 配置。</td>
<td>管理员</td>
<td>新增 server、测试连接、查看工具、编辑、删除。</td>
<td>server 状态正确工具列表更新失败原因可读AuthZ 预览正确。</td>
<td><code>test_marketplace_and_mcp.py</code><code>test_mcp_tools_server.py</code><code>test_tool_assembler.py</code></td>
</tr>
<tr>
<td>技能学习</td>
<td>验证接受任务能进入技能学习闭环。</td>
<td>有已接受 runskill learning worker 可运行。</td>
<td>技能维护者</td>
<td>运行学习、查看候选、生成草稿、安全检查、提交、批准、发布、回滚。</td>
<td>候选有证据;草稿有报告;高风险被阻断;发布后可被后续任务选择。</td>
<td><code>test_skill_learning_pipeline.py</code><code>test_skill_learning_safety.py</code><code>test_skill_learning_web_api.py</code></td>
</tr>
<tr>
<td>Agent Team</td>
<td>验证复杂任务能被拆分执行并保留证据。</td>
<td>配置至少一个 subagent任务需要多步骤处理。</td>
<td>高级用户、管理员</td>
<td>创建 subagent、发起复杂任务、查看节点结果、模拟节点失败。</td>
<td>执行图可读;子任务结果可见;失败节点不隐藏;最终答案可解释。</td>
<td><code>test_agent_team_v1.py</code><code>test_task_execution_planner.py</code></td>
</tr>
<tr>
<td>连接器与计划任务</td>
<td>验证主动任务可以创建、触发、通知和进入验收。</td>
<td>Cron 服务运行;连接器配置可用或模拟可用。</td>
<td>运营用户、管理员</td>
<td>创建计划任务、立即运行、查看通知、engage 通知、测试 Outlook 或渠道连接。</td>
<td>计划 run 被记录通知可打开engage 后进入任务流;失败连接器可恢复。</td>
<td><code>test_cron_service.py</code><code>test_channel_runtime.py</code><code>test_channel_connection_api.py</code></td>
</tr>
<tr>
<td>设置、状态、日志</td>
<td>验证管理员能定位和恢复运行问题。</td>
<td>存在至少一次聊天 runProvider 和 channel 配置可编辑。</td>
<td>管理员、支持人员</td>
<td>修改配置、刷新状态、查看日志、重启运行时。</td>
<td>配置保存成功;状态反映变化;日志按 run 展开;重启有确认和结果反馈。</td>
<td><code>test_debug_chat_logs_api.py</code><code>test_process_projection.py</code></td>
</tr>
</tbody>
</table>
</div>
</section>
<section id="release">
<div class="section-head">
<div>
<div class="eyebrow">Release</div>
<h2>发布范围:先完成产品需要的模块</h2>
</div>
<p>这里不是精确排期,而是定义从产品完整性角度必须完成的版本边界。</p>
</div>
<div class="timeline">
<article class="phase">
<span class="tag blue">MVP</span>
<h3>可演示闭环</h3>
<ul>
<li>登录进入实例。</li>
<li>Chat 变成 Task。</li>
<li>文件上传和预览。</li>
<li>任务详情、证据、接受、修订。</li>
<li>状态和日志可看。</li>
</ul>
</article>
<article class="phase">
<span class="tag green">Pilot</span>
<h3>可试点闭环</h3>
<ul>
<li>工具/MCP 可接入和测试。</li>
<li>技能候选、草稿、安全、评测、审核、发布。</li>
<li>Agent Team 可解释。</li>
<li>计划任务和通知可用。</li>
<li>部署和恢复文档完整。</li>
</ul>
</article>
<article class="phase">
<span class="tag amber">Governance</span>
<h3>可治理闭环</h3>
<ul>
<li>工具策略分级。</li>
<li>外部写入控制。</li>
<li>技能质量指标。</li>
<li>记忆可查看、编辑、冻结、删除。</li>
<li>审计导出。</li>
</ul>
</article>
<article class="phase">
<span class="tag">Scale</span>
<h3>可规模化闭环</h3>
<ul>
<li>实例备份和恢复。</li>
<li>多团队工作区。</li>
<li>更多连接器。</li>
<li>跨实例指标。</li>
<li>运维自动化。</li>
</ul>
</article>
</div>
</section>
<section id="sources">
<div class="section-head">
<div>
<div class="eyebrow">Code Evidence</div>
<h2>代码依据</h2>
</div>
<p>本页不是纯产品想象,模块来自当前仓库已存在的前端页面、后端接口、服务模块和测试文件。</p>
</div>
<div class="grid-2">
<article class="card">
<h3>前端页面</h3>
<ul>
<li><code>app-instance/frontend/app/(app)/page.tsx</code>Chat 工作台。</li>
<li><code>app-instance/frontend/app/(app)/tasks</code>:任务列表和详情。</li>
<li><code>app-instance/frontend/app/(app)/files</code>:文件工作区。</li>
<li><code>app-instance/frontend/app/(app)/skills</code><code>/marketplace</code>:技能和市场。</li>
<li><code>app-instance/frontend/app/(app)/mcp</code>MCP 工具管理。</li>
<li><code>app-instance/frontend/app/(app)/agents</code>Agent 和 Subagent。</li>
<li><code>app-instance/frontend/app/(app)/outlook</code><code>/notifications</code>:连接器与通知。</li>
<li><code>app-instance/frontend/app/(app)/status</code><code>/logs</code>:配置、状态、日志。</li>
</ul>
</article>
<article class="card">
<h3>后端模块</h3>
<ul>
<li><code>beaver.services.agent_service</code>Agent 执行、任务模式、验收、计划任务。</li>
<li><code>beaver.tasks</code>:任务记录、事件、证据、计划。</li>
<li><code>beaver.skills</code><code>beaver.memory.skills</code>:技能装载、候选、草稿、审核、发布。</li>
<li><code>beaver.tools</code><code>beaver.integrations.mcp</code>:工具和 MCP。</li>
<li><code>beaver.coordinator</code>:多 Agent 执行。</li>
<li><code>beaver.services.user_files</code>:用户文件存储。</li>
<li><code>beaver.services.cron_service</code>:计划任务。</li>
<li><code>beaver.interfaces.channels</code><code>beaver.integrations.outlook</code>:渠道和连接器。</li>
</ul>
</article>
</div>
<div class="table-wrap" style="margin-top: 16px;">
<table>
<thead>
<tr>
<th>产品模块</th>
<th>核心 API / 路由</th>
<th>测试文件线索</th>
</tr>
</thead>
<tbody>
<tr><td>Chat/Task</td><td><code>/api/sessions</code><code>/api/tasks</code><code>/ws/{session_id}</code></td><td><code>test_active_task_api.py</code><code>test_task_mode_feedback.py</code><code>test_websocket_chat.py</code></td></tr>
<tr><td>Files</td><td><code>/api/user-files/*</code><code>/api/workspace/*</code><code>/api/files/*</code></td><td><code>test_user_file_service.py</code><code>test_web_files_api.py</code></td></tr>
<tr><td>Skills</td><td><code>/api/skills</code><code>/api/skills/candidates</code><code>/api/skills/drafts</code></td><td><code>test_skill_learning_pipeline.py</code><code>test_skill_learning_web_api.py</code></td></tr>
<tr><td>MCP/Tools</td><td><code>/api/mcp/servers</code><code>/api/mcp/tools</code></td><td><code>test_marketplace_and_mcp.py</code><code>test_mcp_tools_server.py</code></td></tr>
<tr><td>Agents</td><td><code>/api/agents</code><code>/api/subagents</code></td><td><code>test_agent_team_v1.py</code><code>test_agent_registry_resolver.py</code></td></tr>
<tr><td>Cron/Notifications</td><td><code>/api/cron/jobs</code><code>/api/notifications</code></td><td><code>test_cron_service.py</code></td></tr>
<tr><td>Connectors</td><td><code>/api/channel-connections</code><code>/api/integrations/outlook/*</code></td><td><code>test_channel_connection_api.py</code><code>test_external_connector_bridge_api.py</code></td></tr>
<tr><td>Operations</td><td><code>/api/status</code><code>/api/runtime/restart</code><code>/api/debug/chat-logs</code></td><td><code>test_debug_chat_logs_api.py</code><code>test_process_projection.py</code></td></tr>
</tbody>
</table>
</div>
</section>
</main>
<footer class="footer">
<p>说明:本页基于 2026-06-10 当前 Beaver 代码、已有产品发现文档和指定 PM Execution 技能整理。后续可以继续拆成工程任务、里程碑、验收清单和上线 runbook。</p>
</footer>
</body>
</html>