Help me write tests for a B4.run route. Pick the right style for the route kind:

1. For an agent route like the navlog scaffold's `/navlog#agent`, write a Vitest test with `createAgentHarness`, `script()` fixtures, and agent matchers:

   ```ts
   import { fileURLToPath } from "node:url"
   import { afterAll, it } from "vitest"
   import { createAgentHarness, expectFinalMessage, expectToolCalled, script } from "@b4run/testing"

   const appRoot = fileURLToPath(new URL("..", import.meta.url))
   const h = await createAgentHarness({ appRoot, route: "/navlog#agent" })
   afterAll(async () => {
     await h.close()
   })

   it("reads the POH and cites it", async () => {
     h.reset()
     const run = await h.run({
       input: "What does the POH give for cruise at 4000 ft and 2400 RPM?",
       fixtures: script()
         .user("What does the POH give for cruise at 4000 ft and 2400 RPM?")
         .callsTool("readDoc", { path: "poh/cruise-performance.md" })
         .replies("64% BHP, 110 KTAS, 7.1 GPH. [poh/cruise-performance.md, Figure 5-7]"),
     })

     expectToolCalled(run, "readDoc")
     expectFinalMessage(run).toContain("[poh/")
   }, 60_000)
   ```

2. For deterministic `workflow`, `graph`, or `chain` routes, use a colocated `run.test.ts` scenario file:

   ```ts
   import { scenarios } from "@b4run/sdk/testing"

   export default scenarios("/hello/[tenant]")
     .scenario("returns a greeting", (s) =>
       s
         .input({ tenant: "acme" })
         .expectPassed()
         .expectOutput({ tenant: "acme", greeting: "Hello, acme!" }),
     )
   ```

3. In the route-scoped builder, `.input()` sets the route state and `.expectOutput()` matches the returned state. Set `.expectPassed()` or `.expectFailed()` explicitly. Keep output expectations for deterministic route results, not LLM text exact matches.

4. For an in-process scenario, replace only the external or nondeterministic application tool and assert its calls. Tool names, inputs, and awaited outputs come from the generated route types:
   ```ts
   import { scenarios } from "@b4run/sdk/testing"

   export default scenarios("/navlog").scenario("uses a controlled METAR", (s) =>
     s
       .input({ messages: [{ role: "user", content: "What is the weather at KSTP?" }] })
       .mockTool("getMetar", async ({ ids }) =>
         ids.map((id) => ({
           id,
           observedAt: "2026-10-04T19:53:00.000Z",
           flightCategory: "VFR",
           windDirDeg: null,
           windKt: null,
           visibilityMi: null,
           ceilingFt: null,
           tempC: null,
           dewpointC: null,
           altimeterHpa: null,
           raw: `METAR ${id} 041953Z 00000KT 10SM CLR`,
         })),
       )
       .expectPassed()
       .expectTool("getMetar", (call) =>
         call.calledOnce().withArgs({ ids: ["KSTP"] }),
       ),
   )
   ```

5. To exercise the live B4.run HTTP boundary instead, use a separate server-backed scenario. Server-backed scenarios cannot use tool mocks:
   ```ts
   import { scenarios } from "@b4run/sdk/testing"

   export default scenarios("/hello/[tenant]").scenario(
     "returns a greeting via the dev server",
     (s) =>
       s
         .input({ tenant: "acme" })
         .server("http://127.0.0.1:3001")
         .expectPassed()
         .expectOutput({ tenant: "acme", greeting: "Hello, acme!" }),
   )
   ```
   There is no command-level `--url` flag on `b4 test`.

6. Run agent Vitest files with the package's test runner (for the scaffold, `npm test`). Run route scenario suites with:
   ```
   b4 test
   ```

Constraints:
- Agent tests should use fixtures or live mode; do not exact-match raw assistant message arrays with `.expectOutput()`.
- `run.test.ts` must live in the deterministic route's directory, default-export `scenarios("/route").scenario(...)`, and avoid `describe()` / `test()` wrappers.
- In-process scenarios can replace selected application tools with `.mockTool()` and assert calls with `.expectTool()`; server-backed scenarios cannot use tool mocks.

Reference: https://b4.run/llms.txt
