docs: improve documentation coverage (#52)

This commit is contained in:
banteg
2026-01-04 19:00:27 +04:00
committed by GitHub
parent 465dda20a2
commit c64913ed6d
11 changed files with 197 additions and 219 deletions
+3 -6
View File
@@ -54,7 +54,7 @@ Takopi config lives at `~/.takopi/takopi.toml`.
Add a new optional `[pi]` section.
Recommended v1 schema:
Recommended schema:
```toml
# ~/.takopi/takopi.toml
@@ -62,18 +62,15 @@ Recommended v1 schema:
default_engine = "pi"
[pi]
cmd = "pi" # optional; defaults to "pi"
extra_args = [] # optional list of strings, appended verbatim
model = "..." # optional; passed as --model
provider = "..." # optional; passed as --provider
session_dir = "..." # optional; directory for session files
session_title = "pi" # optional; defaults to model or "pi"
extra_args = [] # optional list of strings, appended verbatim
```
Notes:
* `extra_args` lets you pass new Pi flags without changing Takopi.
* If `session_dir` is omitted, Takopi uses Pi's default session dir:
* Session files are stored under Pi's default session dir:
`~/.pi/agent/sessions/--<cwd>--` (with path separators replaced by `-`).
---
+5 -8
View File
@@ -1,12 +1,10 @@
# Pi -> Takopi event mapping (spec)
This document specifies how the Pi runner shipped in Takopi v0.5.0 translates
Pi CLI `--mode json` JSONL events into Takopi events. The Pi JSONL stream is
`AgentSessionEvent` from `@mariozechner/pi-agent-core`.
This document describes how the Pi runner translates Pi CLI `--mode json` JSONL events into Takopi events.
The goal is to make Pi feel identical to the Codex/Claude runners from the
bridge/renderer point of view while preserving Takopi invariants (stable action
ids, per-session serialization, single completed event).
> **Authoritative source:** The schema definitions are in `src/takopi/schemas/pi.py` and the translation logic is in `src/takopi/runners/pi.py`. When in doubt, refer to the code.
The goal is to make Pi feel identical to the Codex/Claude runners from the bridge/renderer point of view while preserving Takopi invariants (stable action ids, per-session serialization, single completed event).
---
@@ -145,10 +143,9 @@ A minimal TOML config for Pi:
```toml
[pi]
cmd = "pi"
model = "..."
provider = "..."
extra_args = []
```
Use `extra_args` for any newer Pi CLI flags not explicitly mapped.
Use `extra_args` for any Pi CLI flags not explicitly mapped.