feat(types): add budget field to IntentMandate#198
feat(types): add budget field to IntentMandate#198ravyg wants to merge 1 commit intogoogle-agentic-commerce:mainfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a crucial enhancement to the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new 'Budget' field to the IntentMandate type, allowing for an optional maximum total spend ceiling for AI agents. The change is implemented in both Go and Python, including updates to the specification documentation and comprehensive unit tests covering optionality, setting, JSON serialization, and round-trip functionality. The only feedback provided suggests using a standard apostrophe for consistency in the markdown documentation.
|
Hi team — friendly bump on this PR. Happy to address any feedback or adjust the approach if the direction needs changes. Let me know if there's anything blocking review. |
Adds an optional `budget: PaymentCurrencyAmount` field to `IntentMandate` in both Python and Go, giving agents a machine-readable spend ceiling to enforce when fulfilling a purchase intent. - Python: code/sdk/python/ap2/models/mandate.py -- new field + import - Go: code/samples/go/pkg/ap2/types/mandate.go -- new field with omitempty - Tests: 6 Python tests (code/sdk/python/ap2/tests/mandate_tests.py) + 5 Go tests (code/samples/go/pkg/ap2/types/mandate_test.go) covering optionality, setting, JSON serialization, omission when nil, and round-trip. Re-targeted from src/ap2/types/ -> code/sdk/python/ap2/models/ and samples/go/ -> code/samples/go/ following the upstream restructure. Closes google-agentic-commerce#133
|
Hi team — re-targeted this PR onto the latest The diff is now:
Conflict-free now. Happy to adjust anything if the direction needs to shift. |
|
Heads-up on the failing Lint Code Base check — it's pre-existing on What's failing: super-linter's Why this PR isn't the cause:
Happy to open a separate issue/PR for the |
Adds an optional
budget: PaymentCurrencyAmountfield toIntentMandatein both Python and Go, giving agents a machine-readable spend ceiling to enforce when fulfilling a purchase intent.src/ap2/types/mandate.py-- new field + importsamples/go/pkg/ap2/types/mandate.go-- new field with omitemptyCloses #133
Description
Thank you for opening a Pull Request!
Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
CONTRIBUTINGGuide.Fixes #<issue_number_goes_here> 🦕