mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
Sync docs with the defineTool DSL and actual demo code
The architecture cookbook's tool-plugin example now uses defineTool with typed args (the raw-JSON-Schema + `args: any` example contradicted the type-safety policy it sits next to); a note explains raw schemas remain the MCP interop path. The echo-agent README's mock-llm row now matches the code (registerAdapter(['mock-echo'])) and the echo-tool row mentions the typed registration.
This commit is contained in:
@@ -18,8 +18,8 @@ Runnable demo: stdin chat with a scripted mock model and an echo tool.
|
||||
|
||||
| File | Role | Key patterns demonstrated |
|
||||
|---|---|---|
|
||||
| `mock-llm.ts` | `LlmAdapter` registration | `ctx.llm.registerAdapter([])`, streaming chunks with proper `block-start`/`block-end` protocol |
|
||||
| `echo-tool.ts` | Tool registration | `ctx.tools.register()`, tool execution returning `ContentBlock[]` |
|
||||
| `mock-llm.ts` | `LlmAdapter` registration | `ctx.llm.registerAdapter(['mock-echo'], …)`, streaming chunks with proper `block-start`/`block-end` protocol |
|
||||
| `echo-tool.ts` | Tool registration | `ctx.tools.register(defineTool(…))` with typed `execute` args, tool execution returning `ContentBlock[]` |
|
||||
| `session-jsonl.ts` | Persistence | `session/event` listener + `session/flush` drain, fiber-dispose cleanup |
|
||||
| `stdio-chat.ts` | UI | `agent/stream-chunk`, `session/event` (tool/*), stdin→send/steer |
|
||||
| `start.ts` | Bootstrap | `Context` + `Loader` + `plugin-include` wired to `cordis.yml` |
|
||||
|
||||
Reference in New Issue
Block a user