Run one tool, hook or page handler with mocks in place of the agent's tools
Run one piece of owner-authored code with the runtime's engine and mocks in place of the agent's tools, and print what it decided: the result, a validation error, a failure with the developer's file and line, or a handoff; the dependency calls it made, in order, with arguments and what the mock answered; and its console output.
Targets:
tool:
Mocks come from a TypeScript or JavaScript module under the config root that exports "tools", an object of functions from arguments to result:
// tests/mocks.ts export const tools = { supabase_sql: ({ sql, params }) => ({ rows: [] }), };
A dependency call with no mock is a failure that names the tool.
Nothing here reaches a connection or a conversation.
Examples: mutiro agent dev run ./ltl tool:desk_pending --mocks tests/mocks.ts mutiro agent dev run ./ltl tool:desk_mark_sent --args '{"key":"acme--po1","to":"x@y"}' --mocks tests/mocks.ts mutiro agent dev run ./ltl hook:beforeTool --call email_send --args '{"body":"the margin"}' mutiro agent dev run ./ltl handler:shared/dashboards/board:getData --payload '{"limit":5}' --mocks tests/mocks.ts
mutiro agent dev run <config-root> <target> [flags]
| Flag | Type | Description |
|---|---|---|
| --args | string | Arguments as a JSON object, or @file (tool:, hook:beforeTool) |
| --call | string | For hook:beforeTool, the name of the tool being called |
| -h, --help | bool | help for run |
| --json | bool | Print the result as JSON |
| --mocks | string | A .ts or .js module under the config root exporting tools: an object of functions |
| --payload | string | Payload as a JSON object, or @file (hook:onMessage, hook:beforeReply, handler:) |
| --role | string | Role of the caller: owner or user (default "owner") |
| --username | string | Username of the caller (default "dev") |
| Flag | Type | Description |
|---|---|---|
| --config | string | config file (default is ./.mutiro.yaml in current directory) |
| --debug | bool | debug mode |
| -v, --verbose | bool | verbose output |