web-evidence
Overview
web-evidence captures a small, deterministic HTTP evidence bundle for agent workflows. It intentionally avoids browser automation,
cookies, auth headers, and raw network logs. The first releaseable primitive is static URL evidence: status metadata, redacted headers, and
a redacted body preview.
Package vs binary name
| Field | Value |
|---|---|
| Package name | nils-web-evidence |
| Binary name | web-evidence |
Usage
Capture redacted static HTTP evidence for agent workflows.
Usage: web-evidence <COMMAND>
Commands:
capture Capture redacted HTTP metadata and artifact files for one URL
completion Print shell completion script
Options:
-h, --help Print help
-V, --version Print version
Examples:
Commands
capture URL --out DIR [--format text|json] [--label LABEL] [--method get|head] [--timeout-seconds N] [--max-body-bytes N] [--body-preview-bytes N]: send one HTTP/HTTPS request, createDIR, and write a redacted artifact bundle.completion <bash|zsh>: print clap-generated shell completions.
Artifact contract
capture writes exactly these files under --out DIR:
summary.json: versioned summary with status, artifact paths, redaction counts, and error metadata when available.headers.redacted.json: request/response header names with sensitive values redacted.body-preview.redacted.txt: text body preview after truncation and redaction; binary bodies are omitted.
The command does not persist raw cookies, raw auth headers, or raw network logs. URL userinfo and sensitive query parameters are redacted in stdout, JSON, and artifact files.
Output contract
Human-readable text is the default. JSON is opt-in with --format json on capture.
JSON output uses a versioned envelope:
Failure envelopes use ok=false with stable error.code, error.message, and optional error.details. HTTP 4xx and 5xx responses
are classified as http-status-error and still keep the redacted artifact bundle.
Exit codes:
0: success1: runtime failure, network failure, or HTTP status failure64: usage/configuration error