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:
@@ -1,8 +1,7 @@
|
||||
# coding-agent
|
||||
|
||||
The first REAL agent wiring: DeepSeek V4 + the bash tool suite + stdio chat
|
||||
+ JSONL persistence, loaded from `cordis.yml`. Where echo-agent proves the
|
||||
skeleton with mocks, this example is a usable coding assistant.
|
||||
+ JSONL persistence, loaded from `cordis.yml`. Where echo-agent proves the skeleton with mocks, this example is a usable coding assistant.
|
||||
|
||||
## Run it
|
||||
|
||||
@@ -13,11 +12,7 @@ skeleton with mocks, this example is a usable coding assistant.
|
||||
yarn demo:coding
|
||||
```
|
||||
|
||||
Type a coding task. The agent's only tools are `bash` (+ `bash_output` /
|
||||
`bash_kill` for background tasks): file reads, writes, searches, and test
|
||||
runs all happen through shell commands, each in a fresh `bash -c` (the
|
||||
system prompt tells the model to pass `workdir` instead of `cd`). Reasoning
|
||||
streams dimmed; tool calls/results render inline.
|
||||
Type a coding task. The agent's only tools are `bash` (+ `bash_output` / `bash_kill` for background tasks): file reads, writes, searches, and test runs all happen through shell commands, each in a fresh `bash -c` (the system prompt tells the model to pass `workdir` instead of `cd`). Reasoning streams dimmed; tool calls/results render inline.
|
||||
|
||||
```
|
||||
> fix the failing test in /path/to/project
|
||||
@@ -39,13 +34,7 @@ streams dimmed; tool calls/results render inline.
|
||||
|
||||
## End-to-end tests (`yarn test:e2e`, key-gated)
|
||||
|
||||
- `tests/full-loop.e2e.ts` — the canary: real model runs `echo e2e-ok`
|
||||
through the real bash tool; asserts `tool/call`/`tool/result` session
|
||||
events and the final answer.
|
||||
- `tests/coding-task.e2e.ts` — the swebench-style smoke: a temp dir holds
|
||||
`add.js` (with `a - b` where `a + b` belongs) and a failing
|
||||
`add.test.js`; the agent must fix the bug and verify. The test re-runs
|
||||
`node add.test.js` ITSELF and inspects the files — agent claims are not
|
||||
trusted.
|
||||
- `tests/full-loop.e2e.ts` — the canary: real model runs `echo e2e-ok` through the real bash tool; asserts `tool/call`/`tool/result` session events and the final answer.
|
||||
- `tests/coding-task.e2e.ts` — the swebench-style smoke: a temp dir holds `add.js` (with `a - b` where `a + b` belongs) and a failing `add.test.js`; the agent must fix the bug and verify. The test re-runs `node add.test.js` ITSELF and inspects the files — agent claims are not trusted.
|
||||
|
||||
Both self-skip without `DEEPSEEK_API_KEY`.
|
||||
|
||||
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user