-
Notifications
You must be signed in to change notification settings - Fork 423
feat(ghost-protocol): add AP2 intent mandate for autonomous infra set… #216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Lesedi37
wants to merge
11
commits into
google-agentic-commerce:main
Choose a base branch
from
Lesedi37:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+27
−0
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
231b558
feat(ghost-protocol): add AP2 intent mandate for autonomous infra set…
Lesedi37 106a192
feat(ghost-protocol): add AP2 intent mandate for autonomous infra set…
Lesedi37 90d910b
fix: resolve false-positive spell-check for 'ethr' in DID string
Lesedi37 27f75f6
Add JSON structure for words and ignoreWords
Lesedi37 d111d62
Update intent-mandate.json for clarity and merchants
Lesedi37 01ef605
Update intent-mandate.json
Lesedi37 03cd5c0
Update intent-mandate.json with new fields
Lesedi37 6aede57
Update intent-mandate.json with new proofValue format
Lesedi37 5eea39a
Update proof creation date and proof value format
Lesedi37 fe115ec
Add 'google-agentic-commerce' to merchants list
Lesedi37 e88cccd
Update intent-mandate.json for merchant and proofValue changes
Lesedi37 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
samples/python/scenarios/ghost-protocol/intent-mandate.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "@context": [ | ||
| "https://www.w3.org/ns/credentials/v2", | ||
| "https://ap2-protocol.net/v1" | ||
| ], | ||
| "id": "urn:uuid:58a731d1-b2c3-4d4e-8f9a-1db618e6bfc3", | ||
| "type": ["VerifiableCredential", "IntentMandate"], | ||
| "issuer": "did:ethr:0x1db618e6bfc35bd48b91431a55c4948b27e7a539", | ||
| "validFrom": "2026-04-13T10:00:00Z", | ||
| "credentialSubject": { | ||
| "id": "did:ethr:0x1db618e6bfc35bd48b91431a55c4948b27e7a539", | ||
| "natural_language_description": "Allow ghost-protocol-node-v1 to purchase data proxies and hosting up to 200 USDC/mo.", | ||
| "intent_expiry": "2026-12-31T23:59:59Z", | ||
| "merchants": ["proxies.sx", "render.com"], | ||
| "user_cart_confirmation_required": false | ||
| }, | ||
| "proof": { | ||
| "type": "EthereumEip712Signature2021", | ||
| "created": "2026-04-14T10:30:00Z", | ||
| "verificationMethod": "did:ethr:0x1db618e6bfc35bd48b91431a55c4948b27e7a539#controller", | ||
| "proofPurpose": "assertionMethod", | ||
| "proofValue": "[PASTE_YOUR_0x_SIGNATURE_HERE]" | ||
| }, | ||
| "metadata": { | ||
| "linter_override": "cspell:ignore ethr" | ||
| } | ||
| } | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
credentialSubjectis missing required fields defined in theIntentMandatemodel (seesrc/ap2/types/mandate.py). Specifically,natural_language_descriptionandintent_expiryare mandatory. Additionally, the fieldsagentId,isNonCustodial, andconstraintsare present in the JSON but are not defined in the provided Python class, which may cause validation issues if this JSON is processed by the application.