-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathonecode.html
More file actions
401 lines (351 loc) · 19.1 KB
/
Copy pathonecode.html
File metadata and controls
401 lines (351 loc) · 19.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OneCode - X2Agent</title>
<meta name="description" content="OneCode - 生产级CLI AI编程助手,基于.NET 10与MAF构建,引入Hyperlight沙箱、LSP集成、代码索引与DAG并行调度等增强能力。">
<meta name="keywords" content="OneCode, AI编程助手, CLI, .NET, MAF, Hyperlight, LSP, 代码索引, DAG并行, 多代理, 沙箱">
<meta name="author" content="X2Agent">
<meta name="robots" content="index, follow">
<link rel="stylesheet" href="css/style.min.css">
<link rel="icon" type="image/x-icon" href="images/favicon.ico">
</head>
<body>
<!-- Header -->
<header>
<div class="header-container">
<div class="logo-container">
<h1><a href="index.html">X2Agent</a></h1>
</div>
<nav class="navigation">
<ul class="nav-links">
<li><a href="index.html#agents">智能助手</a></li>
<li><a href="index.html#features">平台特性</a></li>
<li><a href="index.html#about">关于我们</a></li>
</ul>
</nav>
<div class="header-actions">
<a href="https://github.com/X2Agent" class="github-link" target="_blank" rel="noopener noreferrer">
<img src="images/github-mark.svg" alt="GitHub" width="16" height="16">
View on GitHub
</a>
</div>
</div>
<div class="blob"></div>
<div class="blob"></div>
</header>
<!-- Main Content -->
<main>
<div class="onecode-page">
<!-- Hero Section -->
<section class="hero-section">
<div class="hero-content">
<div class="agent-hero-icon">
<svg width="120" height="120" viewBox="0 0 120 120" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="20" y="30" width="80" height="60" rx="8" fill="#1d1d1f" />
<circle cx="30" cy="42" r="4" fill="#ff5f57" />
<circle cx="44" cy="42" r="4" fill="#ffbd2e" />
<circle cx="58" cy="42" r="4" fill="#28c840" />
<path d="M30 62l10 8-10 8" stroke="#4cd964" stroke-width="3" fill="none" stroke-linecap="round" stroke-linejoin="round" />
<path d="M52 78h16" stroke="#0a84ff" stroke-width="3" fill="none" stroke-linecap="round" />
<path d="M30 52v-6" stroke="#ff9f0a" stroke-width="3" fill="none" stroke-linecap="round" />
</svg>
</div>
<h1 class="hero-title">OneCode</h1>
<p class="hero-subtitle">生产级CLI AI编程助手,基于 .NET 10 + MAF 与 Terminal.Gui 全屏 TUI 构建,引入 Hyperlight 沙箱、LSP 集成、代码索引、DAG 并行调度等增强能力</p>
<div class="hero-actions">
<a href="https://github.com/X2Agent/OneCode" class="btn-primary" target="_blank">立即体验</a>
<a href="#quickstart" class="btn-secondary">快速开始</a>
</div>
</div>
</section>
<!-- 核心能力 -->
<section class="features" id="features">
<div class="features-container">
<h2 class="features-title">核心能力</h2>
<div class="features-grid">
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="14" y="18" width="32" height="24" rx="4" fill="#34c759" fill-opacity="0.2" />
<rect x="14" y="18" width="32" height="24" rx="4" stroke="#34c759" stroke-width="2" fill="none" />
<path d="M22 30l5 4-5 4" stroke="#34c759" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round" />
<path d="M32 38h6" stroke="#34c759" stroke-width="2" fill="none" stroke-linecap="round" />
</svg>
</div>
<h3 class="feature-title">Hyperlight 沙箱</h3>
<p class="feature-description">微虚拟机隔离代码执行,支持文件挂载控制与网络域名白名单,让AI安全地操作系统命令。</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="30" cy="30" r="22" fill="#007aff" fill-opacity="0.1" />
<path d="M20 30h20M30 20v20" stroke="#007aff" stroke-width="2" />
<circle cx="30" cy="30" r="6" fill="#007aff" fill-opacity="0.3" />
</svg>
</div>
<h3 class="feature-title">LSP 集成</h3>
<p class="feature-description">内置语言服务协议,编辑后实时诊断更新,提供符号搜索与引用查找,编码更精准。</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="18" cy="30" r="6" fill="#af52de" fill-opacity="0.3" />
<circle cx="42" cy="18" r="6" fill="#ff9500" fill-opacity="0.3" />
<circle cx="42" cy="42" r="6" fill="#34c759" fill-opacity="0.3" />
<path d="M23 28l14-8M23 32l14 8" stroke="#1d1d1f" stroke-width="2" opacity="0.5" />
</svg>
</div>
<h3 class="feature-title">代码语义索引</h3>
<p class="feature-description">基于 CodeIndexService 的语义符号搜索,支持精确、模糊与关键字匹配,快速定位代码。</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="12" y="12" width="16" height="16" rx="3" fill="#007aff" fill-opacity="0.2" />
<rect x="32" y="12" width="16" height="16" rx="3" fill="#007aff" fill-opacity="0.5" />
<rect x="22" y="32" width="16" height="16" rx="3" fill="#34c759" fill-opacity="0.4" />
<path d="M20 28v4M40 28v6M30 48v-4" stroke="#1d1d1f" stroke-width="2" opacity="0.5" />
</svg>
</div>
<h3 class="feature-title">DAG 并行调度</h3>
<p class="feature-description">依赖驱动的并行代理调度,基于拓扑排序高效编排多代理任务,提升复杂任务完成速度。</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="30" cy="18" r="8" fill="#ff9500" fill-opacity="0.3" />
<circle cx="16" cy="42" r="8" fill="#007aff" fill-opacity="0.3" />
<circle cx="44" cy="42" r="8" fill="#34c759" fill-opacity="0.3" />
<path d="M26 24l-6 12M34 24l6 12" stroke="#1d1d1f" stroke-width="2" opacity="0.5" />
</svg>
</div>
<h3 class="feature-title">多代理协作</h3>
<p class="feature-description">支持 simple / magentic / groupchat / DAG 四种子代理模式,Agent 间通过消息路由高效协作。</p>
</div>
<div class="feature-card">
<div class="feature-icon">
<svg width="60" height="60" viewBox="0 0 60 60" fill="none" xmlns="http://www.w3.org/2000/svg">
<circle cx="30" cy="30" r="22" fill="#af52de" fill-opacity="0.1" />
<path d="M30 14v8M30 38v8M14 30h8M38 30h8" stroke="#af52de" stroke-width="2" stroke-linecap="round" />
<circle cx="30" cy="30" r="7" fill="#af52de" fill-opacity="0.3" />
</svg>
</div>
<h3 class="feature-title">跨会话记忆</h3>
<p class="feature-description">User / Session / Repo 三级记忆作用域,AutoDream 后台自动整合关键信息,持续积累项目上下文。</p>
</div>
</div>
</div>
</section>
<!-- 四种工作模式 -->
<section class="use-cases">
<div class="section-container">
<h2 class="section-title">四种工作模式</h2>
<p class="section-subtitle">在 TUI 中按 Tab 键循环切换 BUILD → PLAN → TEAM → GOAL</p>
<div class="section-content">
<div>
<h3>BUILD</h3>
<p>用户输入 → Agent 直接分析并执行,适合小改动、探索性任务与快速修复。</p>
</div>
<div>
<h3>PLAN</h3>
<p>Agent 先生成计划卡片,用户批准后再执行,适合复杂重构与多步骤任务。</p>
</div>
<div>
<h3>TEAM</h3>
<p>通过 team.yaml 驱动多 Agent 协作(Magentic / GroupChat),适合方案评审与复杂协调。</p>
</div>
<div>
<h3>GOAL</h3>
<p>Agent 自主分解目标、迭代执行并以 AI 验证完成度,适合开放式的顶层目标。</p>
</div>
</div>
</div>
</section>
<!-- 特色功能 -->
<section class="features-detail">
<div class="section-container">
<h2 class="section-title">特色功能</h2>
<div class="section-content">
<div>
<h3>安全与执行</h3>
<ul>
<li>Hyperlight 微虚拟机沙箱</li>
<li>SSH 远程执行(SSH.NET)</li>
<li>12 层渐进式安全带机制</li>
</ul>
</div>
<div>
<h3>智能与编排</h3>
<ul>
<li>LSP 深度集成</li>
<li>代码语义索引</li>
<li>DAG 并行调度</li>
<li>Agent 间消息路由</li>
</ul>
</div>
<div>
<h3>工程化能力</h3>
<ul>
<li>AutoDream 记忆整合</li>
<li>Git Worktree 任务隔离</li>
<li>Cron 定时任务</li>
<li>VCR 录制回放</li>
</ul>
</div>
<div>
<h3>便捷与发布</h3>
<ul>
<li>多级上下文压缩</li>
<li>Token 精确估算</li>
<li>自包含单文件发布</li>
<li>飞书 / 企业微信通知</li>
</ul>
</div>
</div>
</div>
</section>
<!-- 快速开始 -->
<section class="use-cases onecode-quickstart" id="quickstart">
<div class="section-container">
<h2 class="section-title">快速开始</h2>
<div class="qs-block">
<h3 class="qs-block-title">安装</h3>
<div class="qs-grid">
<div class="qs-card">
<span class="qs-label">Windows (PowerShell)</span>
<div class="terminal">
<div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><em>PowerShell</em></div>
<pre><code>irm https://raw.githubusercontent.com/X2Agent/OneCode/main/scripts/install.ps1 | iex</code></pre>
</div>
</div>
<div class="qs-card">
<span class="qs-label">Linux / macOS</span>
<div class="terminal">
<div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><em>bash</em></div>
<pre><code>curl -fsSL https://raw.githubusercontent.com/X2Agent/OneCode/main/scripts/install.sh | bash</code></pre>
</div>
</div>
</div>
</div>
<div class="qs-block">
<h3 class="qs-block-title">使用</h3>
<div class="qs-grid">
<div class="qs-card">
<span class="qs-label">交互式 TUI</span>
<div class="terminal">
<div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><em>onecode</em></div>
<pre><code>onecode
# 携带初始 prompt 直接执行
onecode "修复登录页的 CSS 问题"</code></pre>
</div>
</div>
<div class="qs-card">
<span class="qs-label">指定工作目录</span>
<div class="terminal">
<div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><em>onecode</em></div>
<pre><code>onecode --cwd /path/to/project "分析项目结构"</code></pre>
</div>
</div>
<div class="qs-card">
<span class="qs-label">版本与帮助</span>
<div class="terminal">
<div class="terminal-bar"><span class="dot"></span><span class="dot"></span><span class="dot"></span><em>onecode</em></div>
<pre><code>onecode --version
onecode --help</code></pre>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 免责声明 -->
<section class="about-section">
<div class="section-container">
<h2 class="section-title">关于 OneCode</h2>
<div class="about-content">
<div class="about-text">
<h3>项目说明</h3>
<p>OneCode 是一个生产级 CLI AI 编程助手,采用 .NET 10 + MAF (Microsoft Agent Framework) 1.17 构建,基于 Terminal.Gui v2 全屏 TUI,引入 Hyperlight 沙箱、LSP 集成、代码索引、DAG 并行调度等增强功能。</p>
<h3>许可证与声明</h3>
<p>本仓库内容仅用于技术研究和科研爱好者交流学习参考,严禁商用、盈利或未经授权的使用。知识产权归原公司所有,若有侵权请联系删除。</p>
</div>
<div class="stats-container">
<div class="stats-row">
<div class="stat-item">
<div class="stat-number">91%</div>
<div class="stat-label">能力综合完成度</div>
</div>
<div class="stat-item">
<div class="stat-number">~37</div>
<div class="stat-label">内置工具</div>
</div>
</div>
<div class="stats-row">
<div class="stat-item stat-item-full">
<div class="stat-number">1600+</div>
<div class="stat-label">测试方法</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
</main>
<!-- Footer -->
<footer>
<div class="footer-container">
<div class="footer-content">
<div class="footer-section">
<h4>X2Agent</h4>
<p>构建下一代智能助手生态系统,为每个领域提供专业的AI解决方案。</p>
<div class="social-links">
<a href="https://github.com/X2Agent" class="social-link">GitHub</a>
<a href="#docs" class="social-link">文档</a>
</div>
</div>
<div class="footer-section">
<h4>智能助手</h4>
<ul>
<li><a href="market-assistant.html">MarketAssistant</a></li>
<li><a href="writer-assistant.html">WriterAssistant</a></li>
<li><a href="onecode.html">OneCode</a></li>
</ul>
</div>
<div class="footer-section">
<h4>资源</h4>
<ul>
<li><a href="#docs">开发文档</a></li>
<li><a href="#community">社区</a></li>
<li><a href="#support">技术支持</a></li>
</ul>
</div>
<div class="footer-section">
<h4>关于</h4>
<ul>
<li><a href="index.html#about">关于我们</a></li>
<li><a href="#careers">加入我们</a></li>
<li><a href="#contact">联系方式</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>© 2026 X2Agent. 开源项目,欢迎贡献。</p>
<p>基于 Apache License 2.0 许可证发布</p>
</div>
</div>
</footer>
<!-- AI生成说明悬浮窗口 -->
<div class="ai-notice-float">
<div class="notice-inner">
<div class="notice-icon">🤖</div>
<div class="notice-body">
<h4 class="notice-title">AI生成网站</h4>
<p class="notice-text">本网站由人工智能技术生成</p>
</div>
</div>
</div>
</body>
</html>