Skip to content

Commit 7d67dcd

Browse files
committed
feat(website): showcase intelligent coding capabilities
1 parent 8af99c9 commit 7d67dcd

12 files changed

Lines changed: 3481 additions & 795 deletions

File tree

website/docs/v6.6.0/en/guide/tui.mdx

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,56 @@ existing directory, and is created atomically with private permissions. Parent
321321
traversal, escaping symlinks, missing parent directories, and existing targets
322322
are rejected instead of overwriting or writing outside the workspace.
323323

324+
## Code Intelligence
325+
326+
The agent, TUI `/ide`, and A3S Web Monaco editor share one read-only Code
327+
Intelligence runtime. The current language profiles cover Rust and
328+
TypeScript/JavaScript. Install the matching `rust-analyzer` or
329+
`typescript-language-server` executable before starting `a3s code`. A missing
330+
server degrades only that language; it does not disable the editor, ordinary
331+
file tools, or another working language.
332+
333+
Semantic results always describe files saved on disk. Unsaved editor buffers
334+
are never published to the shared runtime. The UI labels those results as the
335+
"saved version," and saving refreshes the workspace manifest and subsequent
336+
semantic queries.
337+
338+
Press `:` inside `/ide` to use:
339+
340+
| Command | Result |
341+
| ------------------------ | -------------------------------------------------------- |
342+
| `:status` | Language state and negotiated capabilities. |
343+
| `:symbols [query]` | Current-file symbols or bounded workspace symbol search. |
344+
| `:definition` | Definitions at the saved-file cursor position. |
345+
| `:declaration` | Declarations at the saved-file cursor position. |
346+
| `:references` | References at the saved-file cursor position. |
347+
| `:implementations` | Implementations at the saved-file cursor position. |
348+
| `:diagnostics` | Diagnostics for the current saved file. |
349+
| `:diagnostics workspace` | Bounded diagnostics across saved workspace files. |
350+
351+
The agent receives the same capability through `code_symbols`,
352+
`code_navigation`, and `code_diagnostics`. Source reads, text search, and
353+
mutations still go only through `read`, `grep`, `edit`, and `patch`; Code
354+
Intelligence does not create a second mutation path.
355+
356+
## Cross-Session Context Recall
357+
358+
When the local `ctx` index is installed and initialized, startup enables two
359+
recall tiers: long-term Memory for curated durable information, and `/ctx` for
360+
raw history across tools and sessions. Use it to recover prior decisions,
361+
commands, failures, and test evidence instead of deriving the same work again.
362+
363+
| Command | Behavior |
364+
| --------------- | ------------------------------------------------------------------------------------------ |
365+
| `/ctx <query>` | Search the local session index and display up to eight selectable hits. |
366+
| `/ctx <n>` | Pull a bounded window around hit n and attach it once to the next message. |
367+
| `/ctx save <n>` | Save the hit as episodic memory with `ctx_event_id` and `ctx_session_id` provenance links. |
368+
369+
An attached transcript is control-character stripped, size-bounded, and quoted
370+
as untrusted historical reference. Instructions inside it do not become
371+
current user instructions. A promoted memory carries `source=ctx`, so the
372+
memory view can jump back to its originating event or session.
373+
324374
## Sessions And Safety
325375

326376
Core session snapshots auto-save under
@@ -559,6 +609,25 @@ reports, and local loops keep working.
559609
Signed-in behavior adds A3S OS asset publication, runtime tools, trusted view
560610
links, and asset activity panels without changing the local-first TUI contract.
561611

612+
The signed-in progressive capability API uses one permission-filtered endpoint
613+
and expands only as needed:
614+
615+
```text
616+
list → search → describe → execute
617+
modules find op one schema run it
618+
```
619+
620+
The model discovers modules, searches operations, and loads the complete schema
621+
for only the operation it will call. An `execute` request with `shaped=true`
622+
can return a trusted `.view` or `viewUrl`, which becomes an inline `Open view`
623+
action in the TUI.
624+
625+
Login also registers the `runtime` tool. It resolves a tool-kind worker by UUID
626+
or name, submits independent inputs as an A3S OS Function-as-a-Service batch,
627+
streams per-item progress, and returns aggregated results. When signed out, the
628+
tool is absent from the model registry; local files, shell, MCP, `task`,
629+
`parallel_task`, `dynamic_workflow`, Memory, and `/ctx` remain available.
630+
562631
| Capability | Signed out | Signed in after `/login` |
563632
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------- |
564633
| Coding chat and workspace tools | Available with local permission checks and HITL approval. | Available with the same local safety path. |

website/docs/v6.6.0/zh/guide/tui.mdx

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,85 @@ TUI 将 `AgentSession::stream()` 视为事实来源。运行时事件驱动对
192192
这个分层对产品构建者很重要:TUI 只是运行时上方的一个有主张的客户端。
193193
SDK 嵌入方可以基于同样的会话、工具、事件、持久化与验证 API 构建不同控制面。
194194

195+
## HITL 权限确认
196+
197+
HITL 是执行边界,不是按工具名称粗略分类。Default 模式会让受约束的 Workspace
198+
文件修改和沙箱内普通命令保持流畅;显式主机 Shell、缺少沙箱时的 Shell、受保护控制
199+
元数据、修改型 Git 操作和带外部副作用的调用会在执行前暂停。Plan 模式拒绝修改,
200+
Auto 模式永远不会打开确认界面,无法证明安全的操作会直接失败。
201+
202+
确认界面显示规范化后的真实参数,并提供四个明确决定:
203+
204+
1. 仅允许这一次。
205+
2. 在当前会话中允许这一精确能力。
206+
3. 把这一精确能力规则写入项目的 `.a3s/permissions.acl`
207+
4. 拒绝,并把原因返回给 Agent。
208+
209+
`/permissions` 可以检查并撤销会话或项目授权。项目授权使用原子 ACL 重写;撤销只影响
210+
之后的检查,不会取消已经开始执行的工具。
211+
212+
## 代码智能
213+
214+
Agent、TUI `/ide` 和 A3S Web Monaco 共用一个只读代码智能运行时。目前支持 Rust 与
215+
TypeScript/JavaScript;启动 `a3s code` 前应安装对应的 `rust-analyzer`
216+
`typescript-language-server`。缺少某个语言服务只会让该语言显示为不可用或降级,
217+
不会关闭编辑器、普通文件工具或其他正常语言。
218+
219+
语义结果始终基于磁盘上已保存的文件。未保存缓冲区不会发布给共享运行时,界面会明确
220+
显示“已保存版本”,保存后才刷新 Workspace 清单与语义结果。
221+
222+
`/ide` 中按 `:` 后可使用:
223+
224+
| 命令 | 结果 |
225+
| ------------------------ | --------------------------------------------- |
226+
| `:status` | 语言状态与协商后的能力。 |
227+
| `:symbols [query]` | 当前文件符号,或有上限的 Workspace 符号搜索。 |
228+
| `:definition` | 光标位置的定义。 |
229+
| `:declaration` | 光标位置的声明。 |
230+
| `:references` | 光标位置的引用。 |
231+
| `:implementations` | 光标位置的实现。 |
232+
| `:diagnostics` | 当前已保存文件的诊断。 |
233+
| `:diagnostics workspace` | 有上限的 Workspace 诊断。 |
234+
235+
Agent 通过 `code_symbols``code_navigation``code_diagnostics` 使用同一能力;
236+
源码读取、文本搜索和修改仍只经过 `read``grep``edit``patch`,代码智能不会创建
237+
第二条修改路径。
238+
239+
## 跨会话上下文检索
240+
241+
本地 `ctx` 已安装并完成索引时,TUI 在启动时启用两层召回:长期 Memory 保存经过筛选的
242+
稳定信息,`/ctx` 则搜索跨工具、跨会话的原始历史。它用于找回以前的决定、命令、错误
243+
和测试结果,而不是重新推断已经完成的工作。
244+
245+
| 命令 | 行为 |
246+
| --------------- | -------------------------------------------------------------------- |
247+
| `/ctx <query>` | 搜索本地会话索引,并显示最多八个可选择结果。 |
248+
| `/ctx <n>` | 拉取第 n 个结果附近的有界记录,并一次性附加到下一条消息。 |
249+
| `/ctx save <n>` | 保存为长期情节记忆,并保留 `ctx_event_id``ctx_session_id` 回链。 |
250+
251+
附加的历史记录会去除终端控制字符、限制大小,并作为不可信引用文本包裹;其中旧指令不会被
252+
当成当前用户指令执行。保存到 Memory 的结果带有 `source=ctx` 来源,因此可以从记忆追溯
253+
到原始会话。
254+
255+
## 渐进式 API 与 Runtime 工具
256+
257+
这两项能力只在配置 A3S OS 并通过 `/login` 登录后出现。渐进式 API 使用一个按当前账号
258+
权限过滤的入口,按需执行:
259+
260+
```text
261+
list → search → describe → execute
262+
模块 找操作 读单个 Schema 执行
263+
```
264+
265+
模型先发现模块,再搜索操作,只为将要调用的那一个操作加载完整输入输出 Schema,因此
266+
无需把整个平台能力目录塞进会话上下文。`execute` 使用 `shaped=true` 时可以返回受信任
267+
视图,TUI 会把有效 `.view``viewUrl` 显示为内联“打开视图”操作。
268+
269+
登录后注册的 `runtime` 工具用于 A3S OS Function as a Service 批执行。它按 UUID 或名称
270+
解析 tool-kind Worker,把相互独立的输入作为一个批任务提交,流式返回每项进度,最后
271+
聚合所有结果。未登录时该工具不会出现在模型工具列表中;本地文件、Shell、MCP、
272+
`task``parallel_task``dynamic_workflow`、Memory 与 `/ctx` 仍可正常使用。
273+
195274
## 斜杠命令
196275

197276
内置斜杠命令包括:

website/scripts/check-built-site.mjs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,26 @@ for (const file of requiredFiles) {
4848
await access(path.join(outputRoot, file));
4949
}
5050

51+
const capabilityMarkers = [
52+
'a3s-capability-stories',
53+
'HITL',
54+
'PROGRESSIVE API',
55+
'RUNTIME TOOL',
56+
'CODE INTELLIGENCE',
57+
'CTX RECALL',
58+
];
59+
60+
for (const homepage of ['index.html', 'en/index.html']) {
61+
const html = await readFile(path.join(outputRoot, homepage), 'utf8');
62+
for (const marker of capabilityMarkers) {
63+
if (!html.includes(marker)) {
64+
throw new Error(
65+
`${homepage} is missing homepage capability marker: ${marker}`,
66+
);
67+
}
68+
}
69+
}
70+
5171
const brokenReferences = [];
5272
const htmlFiles = await collectHtmlFiles(outputRoot);
5373
const referencePattern = /(?:href|src)="([^"]+)"/g;

website/scripts/check-doc-accuracy.mjs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const [
8787
pythonProject,
8888
rspressConfig,
8989
homeLayout,
90+
tuiRuntimeDemo,
9091
] = await Promise.all([
9192
readFile(path.join(repositoryRoot, 'core', 'Cargo.toml'), 'utf8'),
9293
readFile(path.join(repositoryRoot, 'sdk', 'node', 'package.json'), 'utf8'),
@@ -100,6 +101,10 @@ const [
100101
path.join(websiteRoot, 'theme', 'components', 'HomeLayout.tsx'),
101102
'utf8',
102103
),
104+
readFile(
105+
path.join(websiteRoot, 'theme', 'components', 'TuiRuntimeDemo.tsx'),
106+
'utf8',
107+
),
103108
]);
104109

105110
const sourceVersions = new Map([
@@ -160,7 +165,11 @@ if (JSON.stringify(versions) !== JSON.stringify(configuredVersions)) {
160165
`Rspress revisions are [${versions.join(', ')}], expected [${configuredVersions.join(', ')}].`,
161166
);
162167
}
163-
if (!homeLayout.includes(`a3s-code ${manifest.current}`)) {
168+
if (
169+
![homeLayout, tuiRuntimeDemo].some((source) =>
170+
source.includes(`a3s-code ${manifest.current}`),
171+
)
172+
) {
164173
fail(`The home page does not display a3s-code ${manifest.current}.`);
165174
}
166175

0 commit comments

Comments
 (0)