veripact-witness
Witness merchant promises for AI shopping agents and bind VP1 commitments into PayPal orders via CLI or MCP. Use when an agent needs witnessed checkout evidence, dispute verdicts, or PayPal custom_id commitments.
- License 许可
- MIT
- 最近更新
- 2026-11-12
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- veripact-witness
- description
- Witness merchant promises for AI shopping agents and bind VP1 commitments into PayPal orders via CLI or MCP. Use when an agent needs witnessed checkout evidence, dispute verdicts, or PayPal custom_id commitments.
03 SKILL.md 正文
VeriPact Witness Skill
Any external AI shopping agent can invoke VeriPact to capture what a merchant page promised, have it independently witnessed and time-anchored, and bind the result into the PayPal order record.
Commitment format
Every witnessed receipt produces a 68-character PayPal custom_id:
VP1:<64 lowercase hex chars of sha256(canonical receipt bytes)>
Validate with formatCommitmentPrefix(sha256Hex) from @veripact/sdk
(throws on non-64-char-hex input).
CLI usage
veripact --help
veripact --version
veripact witness --scenario <normal|surcharge_void|adversarial_hidden_dom> [--json]
veripact checkout --scenario <normal|surcharge_void|adversarial_hidden_dom> [--json]
veripact audit-dispute --case <buyer_forgery|merchant_drift> [--json]
veripact verify --scenario <normal> [--json]
veripact wallet-pair [--email <addr>] [--approve --session-id <id>] [--json]
veripact wallet-sync [--json]
veripact partition-create [--label <t>] [--total <usd>] [--max-order <usd>] [--ask-above <usd>] [--json]
veripact partition-list [--json]
veripact wallet-sniper [--sku <sku>] [--target <usd>] [--voucher <code>] [--json]
witnesssnapshots a scenario storefront (hidden-DOM scan, verified quotes, Channel3 cross-check, TSA anchor). Zero PayPal calls.checkoutruns the bilateral guarded flow: snapshot → gate → AUTHORIZE → patch → authorize → post-approval re-gate →CAPTURED|AUTO_VOIDED|BLOCKED_PRE_CHECKOUT.audit-disputereferees the contested case against the PayPal-anchored commitment and drives the dispute toRESOLVEDvia HATEOAS-gated actions.verifyre-verifies a captured bundle: commitment recompute,custom_idexact match, buyer/witness/merchant signatures, TSA anchor (±5 min skew).wallet-pairstarts (or--approves) a QR pairing ceremony; approval vaults the payer and mints the $350 agentic partition.wallet-synclists payments labeledVERIPACT_PROTECTEDvsLEGACY_UNWITNESSEDwith counts.partition-create/partition-listmanage buyer-signed agentic partitions with live availability.wallet-sniperhunts six storefronts and vouchers. It captures only when the post-voucher page passes the witness gate and the partition can fund the all-in total.--jsonprints theDealSniperReport. The captured ordercustom_idis that candidate page'sVP1:commitment.
Keys come from environment variables only (BUYER_*, WITNESS_*,
MERCHANT_*, PAYPAL_* — see .env.example). Never pass key material
as CLI flags. Without env keys every command runs fully offline on
deterministic demo fixtures (results carry demoKeys: true).
MCP usage (stdio JSON-RPC 2.0)
Server: @veripact/mcp-server. Methods: initialize, tools/list,
tools/call. Tools:
| Tool | Arguments | Purpose |
|---|---|---|
veripact_witness_offer |
{ scenario } |
Witness a scenario storefront (no PayPal calls) |
veripact_execute_guarded_checkout |
{ scenario } |
Run a guarded witnessed checkout |
veripact_verify_order_receipt |
{ scenario } or { bundle } |
Verify a bundle (demo or explicit TransactionBundleInput) |
veripact_adjudicate_contested_dispute |
{ case } |
Audit a contested dispute to RESOLVED |
veripact_pair_wallet |
{ action: 'start' } or { action: 'approve', sessionId, payerEmail } |
Pair a wallet over QR (approval vaults + mints $350 partition) |
veripact_sync_payments |
{} |
Sync protected vs legacy payments |
veripact_partition_spend |
{ scenario, amountUsd?, agentToken? } |
Partitioned agent payment (capture / wall-void / ask-human) |
veripact_run_deal_sniper |
{ sku?, targetMaxAllInUsd?, customVoucherCode? } |
Deal/voucher hunt; capture binds the post-voucher VP1: into custom_id |
scenario ∈ normal | surcharge_void | adversarial_hidden_dom;
case ∈ buyer_forgery | merchant_drift. Results arrive as
content[0].text JSON. Key material is never accepted over stdin —
arguments carrying private-key/secret keys are rejected.
Honesty contract
- A timestamp proves hash existence at time T plus independent witness observation. It never proves content truth.
- Live mode calls the real PayPal Sandbox. Responses labeled
DETERMINISTIC_SANDBOX_REPLAY(or fixtures labeledREPLAY) are deterministic test data, never live evidence. - Every SDK/CLI/MCP result carries
transportModeanddemoKeyslabels.
Status: v1.0.0 — CLI, MCP tools, bilateral checkout, and dispute audit are production against the PayPal Sandbox (live) or the deterministic replay engine (offline). Workbench UI and benchmark harness land in later prompts.
04 同仓库更多 Skills
web-design-guidelines
Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".
security-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
paypal-api-context
Verified PayPal REST API request/response schemas, enums, and limits for VeriPact. Use when building Orders v2, Payments v2, Disputes v1, or webhook-verification calls.
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.
write-swift
How to write modern Swift well — modeling with value types, Swift 6 data-race safety and approachable concurrency (@concurrent, main-actor-by-default, actors, task groups), protocols and generics (some vs any), API design, performance and ARC, Swift Testing, macros, and the modern language features agents don't know about yet. Use when writing, reviewing, or migrating Swift, or when a concurrency error, a hang, a data race, a retain cycle, or a performance problem needs fixing.