docs: rescan rebased documentation hierarchy

This commit is contained in:
Turtle
2026-08-05 12:46:38 +08:00
parent 012bb0a549
commit 8af3babaea
304 changed files with 1091 additions and 1983 deletions

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/compact/README.md
README.md: aa9fa6d9419de87a7df23a437f5ea8694d981b28
README.zh.md: 7c8752d891880cdb3fd3015a5bd088c7b5e0f2b6
README.md: 509ea2764250f42e492f787deba959a8dd9967b7
README.zh.md: adc52690dbe9e904d8f24199cb78493dab3333a4

View File

@@ -1,14 +1,14 @@
# compact/压缩能力家族
# compact/压缩能力家族
[English](README.md) | 中文
一个压缩compaction能力家族见[能力 seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md)):抽象接口、摘要生成后端、不依赖模型工具结果剪枝配套组件,以及面向用户命令适配器。这些全是**产品**包。
一个压缩compaction能力家族见[能力 seam](../../.agents/notes/implemented/architecture/2026-06-13-capability-seams.md)):抽象接口、摘要后端、模型工具结果修剪配套工具,以及用户命令适配器。这些全是**产品**包。
| 包 | 职责 | ctx key |
|---|---|---|
| `compact/` | 抽象压缩 seam(接口 + `compact/*` 事件 + `CompactionResult` | `ctx.compact` |
| `compact-basic/` | 后端:`ctx.tokenMeter` 压力 + 按 token 预算保留内容 + `llm.stream()` 摘要生成 | 注册 `ctx.compact` |
| `compact-tool-result-prune/` | 可选的不依赖模型的头/中/尾重写,在摘要压缩之前运行 | `ctx.toolResultPrune` |
| `command-compact/` | 面向用户的 `/compact` 命令,基于后端无关的 `compactNow()` seam | 注册到 `ctx.commands` |
| [`compact/`](compact/README.md) | 压缩 seam 与事件词汇 | `ctx.compact` |
| [`compact-basic/`](compact-basic/README.md) | token 压力与摘要后端 | 注册 `ctx.compact` |
| [`compact-tool-result-prune/`](compact-tool-result-prune/README.md) | 可选的无模型工具结果修剪 | `ctx.toolResultPrune` |
| [`command-compact/`](command-compact/README.md) | 用户压缩命令 | 注册到 `ctx.commands` |
接口位于 `compact/compact/`,后端位于 `compact/compact-basic/`,确定性剪枝位于 `compact/compact-tool-result-prune/`,命令位于 `compact/command-compact/`。与 bash seam 不同,该接口依赖 `dsh-session``dsh-llm`,因为它的操作以 `Session` 为对象,输出则使用 `ContentBlock`。这项偏差记录在[压缩能力 seam Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md) 中。token 测量仍是可复用的 LLM大语言模型家族服务基于模板或模型的压缩器可以替换 `compact-basic`,而无需更改计量器、剪枝器、命令或自动调用方
后端、可选修剪器和用户命令通过该 seam 组合token 测量仍是独立的 LLM大语言模型家族服务。[压缩能力 seam Agent Note](../../.agents/notes/implemented/feature/2026-06-18-compaction-capability-seam.md)负责依赖关系的设计原理

View File

@@ -2,5 +2,5 @@
# side as of the last confirmed-consistent state. Both languages carry equal authority;
# after editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/compact/command-compact/README.md
README.md: 1445e76f8328a9ac1c5f9dd43094f1c1cd5d2ad4
README.zh.md: b7357c0efc83c8ccce709518ac2dd2f5e66bbace
README.md: a32a6aeb9957f0fd5f8cff58b1edbb9bc29a4e3d
README.zh.md: c678f522115d9b0fd414b2f290b3cb54ce690722

View File

@@ -2,7 +2,7 @@
English | [中文](README.zh.md)
Human-facing `/compact` control over [`ctx.compact`](../compact/README.md). The plugin registers one global command through [`ctx.commands`](../../ui/commands/README.md), so every composed command adapter discovers it; the shipped TUI executes it without a model turn. The [queued manual compaction Agent Note](../../../.agents/notes/implemented/feature/2026-07-30-queued-manual-compaction.md) owns the admission, lock, and durability decisions.
Human-facing `/compact` control over [`ctx.compact`](../compact/README.md). The plugin registers one global command through [`ctx.commands`](../../ui/commands/README.md), so every composed command adapter discovers and executes it without a model turn. The [queued manual compaction Agent Note](../../../.agents/notes/implemented/feature/2026-07-30-queued-manual-compaction.md) owns the admission, lock, and durability decisions.
## Command contract
@@ -41,7 +41,7 @@ The producer injects `commands` and `compact`. Mount the command registry, one b
name: '@deepseek-ai/dsh-command-compact'
```
The TUI example and CLI host mount it beside `compact-basic`. Automation surfaces that compose no command registry keep automatic compaction only.
The shipped `dsh` base mounts it beside `compact-basic`, and the Web client provides the command adapter. Automation surfaces that compose no command adapter keep automatic compaction only.
## Model Experience

View File

@@ -2,7 +2,7 @@
[English](README.md) | 中文
通过 [`ctx.compact`](../compact/README.md) 提供面向用户的 `/compact` 压缩compaction控制。该插件通过 [`ctx.commands`](../../ui/commands/README.md) 注册一个全局命令,因此组合中的每个命令适配器都能发现它;随附 TUI 无需模型轮次即可执行该命令。[排队手动压缩 Agent Note](../../../.agents/notes/implemented/feature/2026-07-30-queued-manual-compaction.md)拥有接纳、锁与持久性决策。
通过 [`ctx.compact`](../compact/README.md) 提供面向用户的 `/compact` 压缩compaction控制。该插件通过 [`ctx.commands`](../../ui/commands/README.md) 注册一个全局命令,因此组合中的每个命令适配器都能发现并执行它,无需模型轮次。[排队手动压缩 Agent Note](../../../.agents/notes/implemented/feature/2026-07-30-queued-manual-compaction.md)拥有接纳、锁与持久性决策。
## 命令契约
@@ -41,7 +41,7 @@ busy 结果有意限定在进程范围内:活动的未匹配标记会阻塞,
name: '@deepseek-ai/dsh-command-compact'
```
TUI 示例与 CLI host 将它挂载在 `compact-basic` 旁。未组合命令注册表的自动化接口只保留自动压缩。
随附 `dsh` 基础配置将它挂载在 `compact-basic`Web 客户端提供命令适配器。未组合命令适配器的自动化接口只保留自动压缩。
## 模型体验