docs: unwrap hard-wrapped Markdown to one line per paragraph

Hard line breaks mid-paragraph make docs harder to edit and diff — a
one-word change reflows and re-diffs the whole paragraph. Reflow all
tracked non-vendor Markdown (plus vendor/AGENTS.md) so each prose
paragraph is a single line; soft-wrapping is the editor's job. Fenced
code, tables, and list structure are preserved (wrapped list items fold
to one line per bullet). Documents the convention in AGENTS.md.
This commit is contained in:
Tianyi Cui
2026-06-13 18:39:20 +08:00
parent e98c1c5d42
commit 066f94c7e0
39 changed files with 348 additions and 1206 deletions

View File

@@ -5,14 +5,10 @@ Runnable demo: stdin chat with a scripted mock model and an echo tool.
## What it shows
- A complete Cordis app loaded from `cordis.yml` — the standard "stack of plugins" pattern
- `mock-llm.ts` — a mock `LlmAdapter` that streams scripted responses and calls the
`echo` tool when the user types "echo <something>"
- `echo-tool.ts` — a tool registered via `ctx.tools.register()` that echoes text
back uppercased
- `session-jsonl.ts` — a minimal persistence plugin: write-behind buffering of
`session/event` notifications, drained to a JSONL file at `session/flush`
- `stdio-chat.ts` — a minimal UI plugin: reads stdin lines and `send`/`steer`s
the agent, renders stream deltas, tool calls, and tool results
- `mock-llm.ts` — a mock `LlmAdapter` that streams scripted responses and calls the `echo` tool when the user types "echo <something>"
- `echo-tool.ts` — a tool registered via `ctx.tools.register()` that echoes text back uppercased
- `session-jsonl.ts` — a minimal persistence plugin: write-behind buffering of `session/event` notifications, drained to a JSONL file at `session/flush`
- `stdio-chat.ts` — a minimal UI plugin: reads stdin lines and `send`/`steer`s the agent, renders stream deltas, tool calls, and tool results
## Plugin files
@@ -32,9 +28,6 @@ yarn demo
node --expose-internals --import tsx examples/echo-agent/start.ts
```
Type a message and press Enter. "echo <text>" triggers a tool call round-trip
(the mock model requests the `echo` tool, which echoes the text uppercased,
and the next model step acknowledges it).
Type a message and press Enter. "echo <text>" triggers a tool call round-trip (the mock model requests the `echo` tool, which echoes the text uppercased, and the next model step acknowledges it).
The session is persisted to `<session-id>.jsonl` in the `examples/echo-agent/`
directory. Clean up with: `rm -f examples/echo-agent/*.jsonl`
The session is persisted to `<session-id>.jsonl` in the `examples/echo-agent/` directory. Clean up with: `rm -f examples/echo-agent/*.jsonl`