docs: reorganize developer documentation

This commit is contained in:
2026-06-01 20:59:32 +09:00
parent e6c458021c
commit 9dcbd4c3e0
83 changed files with 1320 additions and 5649 deletions
+27 -6
View File
@@ -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)