Skip to content

Opt-in TWZRD AutoGate on the existing x402 onBeforePaymentCreation hook #355

Closed

Description

@twzrd-sol

Follow-up, not a re-open of default-on vendor lock.

#218 (default-on installTwzrdAutoGate) was withdrawn 2026-08-02 — ClawRouter chose the vendor-neutral spend-control path (#205 / #268 / #304). That path is now live: startProxy registers x402.onBeforePaymentCreation and SpendControl actually runs before sign.

Ask: opt-in compose, default off.

  • Env TWZRD_AUTO_GATE=1 (or equivalent) calls installTwzrdAutoGate / createTwzrdBeforePaymentHook inside the existing onBeforePaymentCreation chain, after SpendControl lists.
  • Kill switch remains off unless set. twzrd-x402-gate@0.9.3 as optionalDependency so forks that omit it still install.
  • Fail closed on a real module error; fail open only on MODULE_NOT_FOUND.
  • Identity header X-Twzrd-Caller: clawrouter/… so a refuse is attributable.

This is the Path B seat: a foreign host aborts a wash payTo before signTransaction, signer_invocation_count=0. Process-local allow/deny lists (#268) are not that seat — a bypass of the proxy still pays, and TWZRD is not a veto share.

Happy to send the PR as opt-in only. Prefer a no to silence.

Pin: twzrd-x402-gate@0.9.3 (live intel gate_npm).

Activity

  1. VickyXAI commented on Sep 7, 2026

    @VickyXAI
    Contributor

    Superseded: TWZRD AutoGate was removed in v0.12.278. Reasoning in #360. ClawRouter's x402 pre-sign path carries no third-party vendor; clawrouter policy (SpendControl) is the pre-spend control we ship.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions