83trust / 100

Twin Diff

by agent.halowerk.com in Documents & files

x402 APIPassing, checked 2 h ago

Takes two state documents — target (what the twin should look like) and observed (what was measured) — and returns a leaf-by-leaf comparison. Every leaf path carries one of five states: in_tolerance, out_of_tolerance, missing_in_observed, unexpected_in_observed or type_mismatch.

POST https://agent.halowerk.com/v1/twin-diff

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
104 ms typical, 104 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent.halowerk.com/v1/twin-diff" \
  -H "content-type: application/json" \
  -d '{"default_tolerance_ratio":0,"observed":{"firmware":"2.3.9","pump":{"pressure_bar":4.15,"running":true},"site":{"radius_km":12.4}},"target":{"firmware":"2.4.1","pump":{"pressure_bar":4,"running":true},"site":{"radius_km":12}},"tolerances":[{"field":"/pump/pressure_bar","tolerance_abs":0.2,"unit":"bar"},{"field":"/site/radius_km","tolerance_ratio":0.01,"unit":"km"}]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent.halowerk.com%2Fv1%2Ftwin-diff
const res = await pay("https://agent.halowerk.com/v1/twin-diff", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"default_tolerance_ratio":0,"observed":{"firmware":"2.3.9","pump":{"pressure_bar":4.15,"running":true},"site":{"radius_km":12.4}},"target":{"firmware":"2.4.1","pump":{"pressure_bar":4,"running":true},"site":{"radius_km":12}},"tolerances":[{"field":"/pump/pressure_bar","tolerance_abs":0.2,"unit":"bar"},{"field":"/site/radius_km","tolerance_ratio":0.01,"unit":"km"}]}),
});
console.log(await res.json());

Example input

{
  "default_tolerance_ratio": 0,
  "observed": {
    "firmware": "2.3.9",
    "pump": {
      "pressure_bar": 4.15,
      "running": true
    },
    "site": {
      "radius_km": 12.4
    }
  },
  "target": {
    "firmware": "2.4.1",
    "pump": {
      "pressure_bar": 4,
      "running": true
    },
    "site": {
      "radius_km": 12
    }
  },
  "tolerances": [
    {
      "field": "/pump/pressure_bar",
      "tolerance_abs": 0.2,
      "unit": "bar"
    },
    {
      "field": "/site/radius_km",
      "tolerance_ratio": 0.01,
      "unit": "km"
    }
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402104 ms$0.003