# Small local tools

These tools make no network or model calls. Node.js 20 or newer is required.

## Price a recorded token mix

```sh
node tools/core.cjs price tools/price-example.json
```

Expected API-equivalent value: $37.20 for the synthetic example. Counts are raw tokens; rates are USD per million. Missing or negative counts/rates are errors, not zero. Record the model, date and any modifiers alongside your actual input.

## Check a compact finding

```sh
node tools/core.cjs finding templates/finding.json
```

Expected: valid true. The example is an observation with no baseline and publicationPermission false. Structure validation does not prove evidence, detect all sensitive free text or authorize submission.

## Run behavioral checks

```sh
node --test tools/core.test.cjs kit/local-memory.test.cjs
```

Tests cover distinct cache pricing, invalid measurement inputs, incompatible comparison units, explicit limits/consent, safe relative export paths, guarded updates and competing claims. In a restricted Windows sandbox, use `node --preserve-symlinks --preserve-symlinks-main` before the same arguments.
