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.
Examples
Runnable demos (not workspaces) that showcase how the harness is wired.
echo-agent
A mock model + echo tool + stdio UI + JSONL persistence demo. Demonstrates:
- Loading plugins from a
cordis.ymlvia@cordisjs/plugin-loader+@cordisjs/plugin-include - Registering a mock
LlmAdapter(streaming scripted responses) - Registering a tool via
ctx.tools.register() - Persisting session events to JSONL via the
session/event+session/flushpattern - A minimal stdio UI consuming
agent/stream-chunkand session events
Run with: yarn demo (or node --expose-internals --import tsx examples/echo-agent/start.ts)
When prompted, type "echo " to trigger a tool call round-trip.