{"_id":"@avee1234/warrant-verify","name":"@avee1234/warrant-verify","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@avee1234/warrant-verify","version":"0.1.0","description":"Zero-dependency Warrant verifier — runs the world-state outcome check against ground truth and renders a verdict (warranted | refuted | unverifiable). Reuses the OpenTrajectory/Inspector judge for fuzzy outcomes; the deterministic world-state engine is th","type":"module","bin":{"warrant":"dist/src/cli.js"},"main":"./dist/src/index.js","types":"./dist/src/index.d.ts","exports":{".":{"types":"./dist/src/index.d.ts","import":"./dist/src/index.js"},"./package.json":"./package.json"},"scripts":{"build":"tsc -p tsconfig.json","test":"tsc -p tsconfig.json && node dist/test/run.js","verify-example":"node dist/src/cli.js verify ../../examples/flight-booking.warrant.json","prepublishOnly":"npm run build && npm test"},"keywords":["warrant","agent","outcome-verification","world-state","reputation","a2a","opentrajectory","open-standard"],"license":"MIT","engines":{"node":">=18"},"repository":{"type":"git","url":"git+https://github.com/abhid1234/warrant.git","directory":"packages/verify"},"homepage":"https://github.com/abhid1234/warrant#readme","bugs":{"url":"https://github.com/abhid1234/warrant/issues"},"publishConfig":{"access":"public"},"comment":"dependencies is intentionally empty — uses only Node built-ins (corp-airlock constraint). devDependencies are build tooling only.","dependencies":{},"devDependencies":{"typescript":"*"},"gitHead":"0d9468ec1efdcc047445aa58807f0044826088de","_id":"@avee1234/warrant-verify@0.1.0","_nodeVersion":"22.22.2","_npmVersion":"11.10.0","dist":{"integrity":"sha512-b60OTv4NaoeXqnbgBT0PjcwGFdxxI0ivuhttwirXwdC4/Zp6ldVLi2HWJZ2a5Q5rc6YtjLfkUmt4DcYVXj1YAA==","shasum":"c7e9309d5be217c2a0618a3718aba36f746204cc","tarball":"https://registry.npmjs.org/@avee1234/warrant-verify/-/warrant-verify-0.1.0.tgz","fileCount":41,"unpackedSize":105087,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDB3RSCghwUX8SF9fQgXiIOjvsuUkHlpECwRno+iHROAQIhAOCFE09BtSdVIoHazHIPe14zDhnAOps0nIHk2bsxZoyB"}]},"_npmUser":{"name":"avee1234","email":"das.abhijit34@gmail.com"},"directories":{},"maintainers":[{"name":"avee1234","email":"das.abhijit34@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/warrant-verify_0.1.0_1782181756566_0.9032850574097799"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-23T02:29:16.466Z","0.1.0":"2026-06-23T02:29:16.704Z","modified":"2026-06-23T02:29:16.855Z"},"maintainers":[{"name":"avee1234","email":"das.abhijit34@gmail.com"}],"description":"Zero-dependency Warrant verifier — runs the world-state outcome check against ground truth and renders a verdict (warranted | refuted | unverifiable). Reuses the OpenTrajectory/Inspector judge for fuzzy outcomes; the deterministic world-state engine is th","homepage":"https://github.com/abhid1234/warrant#readme","keywords":["warrant","agent","outcome-verification","world-state","reputation","a2a","opentrajectory","open-standard"],"repository":{"type":"git","url":"git+https://github.com/abhid1234/warrant.git","directory":"packages/verify"},"bugs":{"url":"https://github.com/abhid1234/warrant/issues"},"license":"MIT","readme":"# @avee1234/warrant-verify\n\nZero-dependency Warrant verifier (spec v0). Runs the **world-state outcome check**\nagainst ground truth and renders a verdict: `warranted` | `refuted` | `unverifiable`.\n\n**The moat:** the verdict is computed only from independent observations of the\nworld (`verification.evidence`), never from the agent's self-reported trace\n(`warrant.body`). Self-reported evidence (`independent: false`) can enrich a\nwarrant but can never, on its own, support `warranted`.\n\n## Build & test\n```bash\nnpm run build   # tsc -> dist/  (no external deps; Node built-ins only)\nnpm test        # builds, then runs the zero-dep harness in test/run.ts\n```\nRequires Node ≥18 and a local `tsc`. No npm install needed at runtime.\n\n## CLI\n```bash\nnode dist/src/cli.js verify   ../../examples/flight-booking.warrant.json  # schema + re-derive verdict\nnode dist/src/cli.js validate ../../examples/flight-booking.warrant.json  # JSON-schema conformance only\nnode dist/src/cli.js rep      ../../examples/                             # context-conditioned reputation\nnode dist/src/cli.js rep --by-harness ../../site/data/warrants.json       # + portable cross-harness breakdown\n```\n- `verify` re-derives the verdict from the warrant's own evidence and schema-validates\n  it — it never trusts the stamped verdict (a flipped stamp is rejected).\n- `validate` checks structure against `schema/warrant-0.schema.json` (the schema file is\n  the source of truth, via a tiny zero-dep subset validator in `schema-validate.ts`).\n- `rep` aggregates a file or directory of warrants into per-domain, per-agent scores\n  (the same `tallyReputation` the reputation board uses). Reputation is keyed by agent\n  identity, so it is **portable across harnesses**; `--by-harness` adds the breakdown.\n\n## API\n```ts\nimport { issueWarrant, verifyWarrant, signWarrant, verifySignature, generateKeypair } from \"@avee1234/warrant-verify\";\nimport type { Probe } from \"@avee1234/warrant-verify\";\n\n// 1. Define a probe that observes GROUND TRUTH, independent of the subject.\nconst airline: Probe = {\n  source: \"amadeus-pnr-api\",\n  independent: true,\n  run: async () => ({ observed: await fetch(`/pnr/${pnr}`).then(r => r.json()), probe: `GET /pnr/${pnr}` }),\n};\n\n// 2. Issue a warrant: probe the world, compare to the claim, compute the verdict.\nconst warrant = await issueWarrant({ /* issuer, subject, intent, claimed_outcome, ... */ }, [airline]);\n\n// 3. (optional) Non-crypto signature — Ed25519 over the canonical body. No chain.\nconst { publicKey, privateKey } = generateKeypair();\nconst signed = signWarrant(warrant, privateKey, \"k1\");\nverifySignature(signed, publicKey); // true\n\n// 4. Anyone receiving a warrant re-derives the verdict before trusting it.\nconst { ok, derivedVerdict } = verifyWarrant(signed);\n```\n\n## What's reused vs. new\n- **New (the wedge):** the world-state probe + comparison (`probe.ts`) and the\n  deterministic verdict engine (`verdict.ts`).\n- **Reused, not rebuilt:** for fuzzy outcomes (`method: \"judge\"`), `judge.ts`\n  exposes a pluggable seam for the shipped OpenTrajectory / Inspector judge — it\n  is not re-implemented here.\n\nSee [`../../docs/warrant-spec.md`](../../docs/warrant-spec.md) for the normative spec.\n","readmeFilename":"README.md","_rev":"1-11a64153527b46e0a4401c561244120f"}