Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Start with the stable kernel: baton is one bidirectional pipeline. chat-tui carr

![baton kernel: one bidirectional pipeline](docs/kernel-pipeline_v1.svg)

v2 keeps that pipeline and makes baton a durable coordination kernel among humans, Harnesses, and Baton Plugins. Each participant keeps its own semantics and enters Core through typed ports: human intent becomes Input or an Interaction result, Harness-native verbs become Interaction drafts through Adapters, and every operation-producing Plugin reconcile verb first becomes an Interaction through the host. An approved execution gate then becomes a HarnessInvocation. Every Plugin-initiated Turn returns to the same Input, context, permission, and routing path.
v3 distills that pipeline to one stable boundary: humans, Harnesses, and Baton Plugins keep their own semantics and resources while coordinating through Core-owned Input, Interaction, HarnessInvocation, and Event facts. Plugins reach external systems through Connectors; every Plugin-initiated Turn still follows the same Input, context, permission, and routing path.

![Baton, Plugin, and Harness relationship](docs/kernel-pipeline_v2.svg)
![Baton v3 coordination kernel](docs/kernel-pipeline_v3.svg)

The terminal has one focus and one host event loop; chat-tui isolates updates by surface, while Baton isolates third-party Package code in one Runner process per active Binding. A blocked or crashed Plugin therefore cannot occupy composer input, and its registrations are withdrawn as one unit.

Expand Down
4 changes: 2 additions & 2 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Plugin host 又增加了一条原则:

![baton 内核:一条双向流水线](docs/kernel-pipeline_v1.svg)

v2 保留这条流水线,并让 baton 成为人、Harness 与 Baton Plugin 之间的持久协作内核。三方保留各自语义,通过 typed port 进入 Core:人的 intent 成为 InputInteraction result,Harness 原生 verb 经 Adapter 成为 Interaction draft,Plugin reconcile verb 经 host 成为 Interaction 或 HarnessInvocation。所有 Plugin 发起的 Turn 都回到同一条 Input、Context、Permission 与 routing 路径。
v3 将这条流水线收敛成一个稳定边界:人、Harness 与 Baton Plugin 保留各自语义和资源,通过 Core 持有的 InputInteraction、HarnessInvocation 与 Event 事实协作。Plugin 通过 Connector 连接外部系统;所有 Plugin 发起的 Turn 仍回到同一条 Input、Context、Permission 与 routing 路径。

![Baton、Plugin 与 Harness 的关系](docs/kernel-pipeline_v2.svg)
![Baton v3 协作内核](docs/kernel-pipeline_v3.svg)

终端只有一个焦点和一个宿主事件循环;chat-tui 按 surface 隔离订阅与重绘,Baton 则让每个活动的三方 Plugin Binding 进入独立 Runner 进程。某个 Plugin 阻塞或崩溃不会占住 composer,它的注册会作为一个整体撤销。

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.35
0.2.37
132 changes: 132 additions & 0 deletions docs/kernel-pipeline_v3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Codex、Claude Code 等原生会话用于执行与加速恢复,不能成为逻

Baton core 位于三类参与者之间:

1. **人** 提交目标、编辑工作、回答问题与作出授权决定,并拥有 BatonSession 的正典历史
1. **人** 提交目标、编辑工作、回答问题与作出授权决定,并拥有 BatonSession 的 Event Ledger
2. **Harness** 提供推理、工具调用与原生执行能力,Adapter 把各家协议归一成稳定契约。
3. **Baton Plugin** 以 Resource 的 `spec/status` 表达长期领域 loop,由 Controller reconcile;
通过 `ReconcileContext` 请求人的决定、准备草稿或发起 Harness Turn,不能直接调用 Harness。
Expand Down Expand Up @@ -54,7 +54,7 @@ Core 直接改变另一方状态。
| 概念 | 语义与 owner |
|---|---|
| **Project** | 按 cwd 组织和发现 BatonSession,并承载同 workspace 跨 Session 的 Plugin 私有数据;不拥有 Session 历史 |
| **BatonSession** | 用户拥有的正典逻辑历史和 session-scoped Plugin 数据;跨 Harness 的唯一时间线 |
| **BatonSession** | 用户拥有的跨 Harness、跨 Lane Event Ledger,以及 session-scoped Plugin 数据 |
| **HarnessTarget** | Baton 配置、调度和状态查询侧的一份具体执行目标;同一 Harness 可有多个 Target,状态必须按 Target 隔离 |
| **Lane** | BatonSession 原生的持久串行任务线;主线 identity 为保留值 `main`,支线使用 `hl_` identity,可由人或 Plugin 发起,并可跨多个 HarnessTarget 接力 |
| **HarnessSession** | Harness 在某个 `Lane × HarnessTarget` 下持有的持久原生执行会话;缺失只影响恢复优化,不阻止 Lane 继续 |
Expand Down
Loading