A small tool built only from the kit, for the tests and as the pattern to copy: commands of both effects, an action that returns an outcome with a preview, a wait on a room, an ambiguous word, a tool-specific exit code and a voice.
npx shadcn@latest add ourostack/ouro-ui/ax-example#v1.3.10It installs lib/ouro/ax/example-cli.ts, with ax-command, ax-effects, ax-exit-codes, ax-outcome, ax-problem, ax-wait. Its tests are ax-example-tests. Every item runs on Node 22.18 or later as it is copied: the files import each other as ./<file>.ts. The Ouro AX guide shows how they fit together.
Exports
exampleCli
const exampleCli: Cli<RunContext>exits
A small tool built only from the kit, for the tests and as the pattern to copy: commands of both effects, an action that returns an outcome with a preview, a wait on a room, an ambiguous word, a tool-specific exit code and a voice.
const exits: ExitTablepostMessage
Someone posts in a room (the tests use it to answer a wait).
function postMessage(ref: string, by: string, text: string): voidresetRooms
Puts the toy's one room back as it started.
function resetRooms(): voidrooms
const rooms: Record<string, { title: string; members: string[]; notes: string[]; messages: AxEvent[] }>setClock
Sets the clock the toy stamps messages and receipts with: tests pass a fixed one, and setClock() puts back the real one.
function setClock(now?: () => Date): void