#!/usr/bin/env node /** * `nucleus-cage` — the front-of-funnel cage command. Take an agent's declared * capability boundary + the log of tool calls it made, REPLAY them through the * runtime {@link Cage} (which applies the boundary itself — out-of-boundary * calls are recorded as denied), and emit a signed, offline-verifiable in-bounds * receipt. Pair it with `nucleus-verify` (or `npx @coproduct_inc/verify`) to * recheck — trusting the math, not the operator. * * Usage: * nucleus-cage --principal --allow a,b,c [options] * cat calls.json | nucleus-cage --principal --allow a,b,c * * calls.json is a JSON array of the tool calls the agent made: * [ { "tool": "search", "subject": "refund policy" }, * { "tool": "pay", "subject": "acct:1234" } ] // outside allow → denied * * OPTIONS: * --principal cryptographic principal the receipt is keyed on (required) * --allow a,b,c comma-separated capability boundary (required) * --key Ed25519 signing key; omit → EPHEMERAL key (demo/CI), the * public key is printed to stderr so a verifier can pin it * --signed-at fix the receipt timestamp (reproducible builds) * --badge [url] print a Markdown badge + verify line to stdout instead * of the receipt (paste on a README / agent card) * --json (default) write the signed receipt JSON to stdout * -h, --help * * EXIT CODES: 0 = receipt produced AND in bounds · 1 = produced but OUT of bounds * · 2 = usage / I/O error. * * HONEST SCOPE: the receipt attests the TOOL boundary (each call's tool ∈ allow) * and is recomputable from the boundary + the call log. It does NOT prove the * agent's outputs are correct, nor argument-level bounds (that is the bytecode * prover's job), nor bind the signer to an accountable identity. */ export {};