docs: reorganize developer documentation
This commit is contained in:
@@ -1,10 +1,31 @@
|
||||
# protocol
|
||||
|
||||
クライアントとPod間の通信プロトコルを定義するクレート。Unix ソケット上で JSON Lines として送受信されるメッセージ型を提供する。
|
||||
## Role
|
||||
|
||||
## 公開型
|
||||
`protocol` defines the JSONL message boundary between Pod clients and Pod servers.
|
||||
|
||||
- `Method` — クライアント→Pod のコマンド(`Run`, `Resume`, `Cancel`)
|
||||
- `Event` — Pod→クライアント のイベント(`TurnStart`, `TextDelta`, `ToolCallStart`, `Usage`, `Error` など)
|
||||
- `TurnResult` — ターン完了状態(`Finished`, `Paused`)
|
||||
- `ErrorCode` — エラー分類(`AlreadyRunning`, `ProviderError`, `ToolError` など)
|
||||
## Boundaries
|
||||
|
||||
Owns:
|
||||
|
||||
- transport-neutral method/event/result types
|
||||
- request/reply and broadcast event shapes
|
||||
- protocol error categories shared by clients and servers
|
||||
|
||||
Does not own:
|
||||
|
||||
- Unix socket implementation details (`client`, `pod`)
|
||||
- TUI rendering (`tui`)
|
||||
- Worker history semantics (`llm-worker`)
|
||||
- durable storage (`session-store`, `pod-store`)
|
||||
|
||||
## Design notes
|
||||
|
||||
The exact enum variants are code authority. The README should describe the boundary, not duplicate every message shape.
|
||||
|
||||
Protocol events can inform UI and orchestration, but durable state changes still need to flow through Pod/session/metadata records.
|
||||
|
||||
## See also
|
||||
|
||||
- [`../../docs/design/pod-session-state.md`](../../docs/design/pod-session-state.md)
|
||||
- [`../../docs/design/context-history.md`](../../docs/design/context-history.md)
|
||||
|
||||
Reference in New Issue
Block a user