feat(consult): add authorization-window-within-ceiling pay Condition - #48
Merged
Merged
Conversation
Adds a pay Floor Condition comparing an EIP-3009 authorization's validBefore against the owner's authorizationWindow policy (mirrors role's mode switch: not-required or required with maxSeconds, 1..86400). Every existing pay fixture gets authorizationWindow: not-required so prior allows are unaffected. Also adds policyFields to every catalog Condition (which Policy fields its checker reads), enforced by validateCatalog for the Conditions known to read policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
authorization-window-within-ceiling, apayFloor Condition comparing an EIP-3009 authorization'svalidBeforeagainst the owner'sauthorizationWindowpolicy. The policy field mirrorsrole's shape:{ mode: "not-required" }or{ mode: "required", maxSeconds }, an integer from 1 to 86400.payfixture now statesauthorizationWindow: { mode: "not-required" }explicitly, so no prior allow changes. A policy that omits the field, or setsmode: "required"with a malformedmaxSeconds, answers UNVERIFIED rather than guessing a default.policyFieldsto every catalog Condition: the list of Policy fields its checker reads (empty for a Condition that decides from the request or a static registry alone).validateCatalognow rejects a policy-reading Condition that declares none, and the value is exposed throughdescribeCatalog().augment/data/*.jsonfrom the built catalog, adds one new offline eval (pay-authorization-window-past-deny), and documents the new Condition inconsult/references/pay/and the agent skill'sconditions.md.Public repository check
npm run public:checkpasses.Test plan
yarn consult:typecheck,yarn consult:build,yarn consult:test(500 passing)yarn mcp:typecheck,yarn mcp:build,yarn mcp:test(165 passing, 3 pending, unchanged)yarn sdk:typecheck,yarn sdk:test(27 passing, unchanged)npm --prefix app test(51 passing, unchanged)node scripts/verify-augment.jsandnode scripts/verify-augment.js --self-testyarn public:check,bash scripts/test-public-boundary.shyarn evals:offline,yarn evals:testyarn lint