Wiretrace

Setup

Wiretrace runs locally as three parts: a PostgreSQL database and the API (Docker Compose), the web workbench, and a runner on your machine that uses your installed, signed-in Kiro CLI.

Prerequisites

  • Docker with Compose
  • Python 3.13 and uv
  • Node.js 22 or newer and pnpm 10
  • Kiro CLI, signed in with kiro-cli login

Install

git clone https://github.com/winsznx/wiretrace.git
cd wiretrace
./scripts/bootstrap
./scripts/dev

scripts/bootstrap creates .env with generated secrets, installs Python and Node dependencies, starts PostgreSQL and runs the migrations. scripts/dev starts the API on 127.0.0.1:8000 and the workbench on http://127.0.0.1:3000.

Pair the runner

1. Open http://127.0.0.1:3000/app/setup and select Create pairing token.

2. Run the command it shows, from the Wiretrace checkout:

uv run wiretrace runner --api http://127.0.0.1:8000 --token wtp_...

The token is single use and expires after 10 minutes. The runner stores its own credential in ~/.wiretrace/runner.json (mode 600) and reconnects on restart with uv run wiretrace runner.

Check the installation

uv run wiretrace doctor

It prints the runner, MCP SDK and Kiro CLI versions, and whether Kiro CLI is signed in. Wiretrace blocks a run when Kiro CLI is missing or signed out. It never substitutes a simulated result.

Run an example

Open Examples, choose Slow startup and a short connection timeout, review the execution plan and select Review and start.

Use the command line

Every investigation step is also available without the web app:

uv run wiretrace run --config path/to/mcp.json --server my-server --tool my_tool --args '{}'
uv run wiretrace reproduce --manifest wiretrace-reproduction/manifest.json --expect target-failure

reproduce exits 0 when the observation matches the expectation, 1 on an observed mismatch, 2 when prerequisites are missing or the result is unresolved, and 130 when cancelled.

Local secrets

Credential values in an imported configuration are moved to ~/.wiretrace/secrets.json (mode 600) and replaced by ${secret:NAME} references. You can also provide values as WIRETRACE_SECRET_NAME environment variables for the runner process. Values are injected only into the trial's server process.

Troubleshooting

  • Runner not connected. Start uv run wiretrace runner and check that the API URL matches.
  • Kiro is not authenticated. Run kiro-cli login on the runner host and restart the runner.
  • Port 5442 in use. Set POSTGRES_PORT in .env and update DATABASE_URL to match.