# my-tool — OpenLatch detection tool (Node.js / Hono)
A Hono starter for an OpenLatch detection tool, running on Node 22+.
## Quick start
```bash
npm install
npm run dev # tsx watch — auto-reload on file change
# or
npm run build && npm start
```
Then send a synthetic event:
```bash
openlatch-provider listen --no-tls --port 8443
openlatch-provider trigger pre_tool_use --tool=Bash --input='ls'
```
## Layout
```
src/server.ts Hono app + /event + /healthz
src/detect.ts Detection logic + Verdict shape
tests/ Vitest round-trip tests
openlatch.yaml Editor / tool / provider / binding manifest
Dockerfile Multi-stage build, distroless final image
.github/workflows/ CI (lint + test)
```
## Replacing the detector
Edit `src/detect.ts`. Return a `Verdict`-shaped object (camelCase fields)
matching `provider-call.schema.json`. The runtime daemon validates,
size-caps (≤250 KB), and HMAC-signs the response on its way back to the
platform.