tsconfig.base.json adds noUncheckedIndexedAccess, exactOptionalPropertyTypes, noImplicitOverride, noFallthroughCasesInSwitch, noUnusedLocals, and noUnusedParameters on top of strict. Vendored packages opt out of the new flags locally (their tsconfigs are ours to regenerate; their source is not), keeping upstream-sync friendliness. Our code fixed accordingly: index accesses acknowledge undefined (assembler flush cursors, lastTurnNumber); optional properties are omitted instead of set-to-undefined (GenerateResult.usage, ToolDefinition.strict, GenerateOptions.system/tools, error payloads via an errorData helper); Session.onAppend is explicitly `(…) => void | undefined`; tests and examples updated for unused parameters and indexed access.
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.