Skip to content

Update built action to include new field: EntityUsage, Add mp self update, add mp --version - #539

Merged
TalShafir1 merged 17 commits into
mainfrom
mp/add-entity-types-to-actiondef
Feb 10, 2026
Merged

TalShafir1 merged 17 commits into
mainfrom
mp/add-entity-types-to-actiondef

Conversation

@TalShafir1

Copy link
Copy Markdown
Member

No description provided.

@TalShafir1
TalShafir1 requested a review from a team as a code owner February 10, 2026 08:02
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @TalShafir1, 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 enhances the action metadata by integrating a new EntityUsage field, which is crucial for describing how entities are utilized within actions, particularly for AI-driven functionalities. The changes involve modifying several core data models and their associated parsing and building logic to support this new field. Additionally, the mp package version has been updated, and a minor dependency update for coverage has been included.

Highlights

  • New EntityUsage Field: A new field, EntityUsage, has been introduced to the action metadata structure. This field is designed to store information about how entities are used within an action, enhancing AI-related metadata.
  • Metadata Model Updates: The BuiltActionMetadata, NonBuiltActionMetadata, and ActionMetadata classes have been updated to incorporate the new EntitiesTypes field, ensuring its proper handling across different metadata representations.
  • AI Fields Integration: The AiFields NamedTuple and the _get_ai_fields function were modified to include and process the new entity_types, indicating its relevance to AI metadata for actions.
  • Version Bump: The mp package version has been incremented from 1.28.7 to 1.28.8.
  • Dependency Update: The coverage dependency has been updated from version 7.13.3 to 7.13.4.

🧠 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.

Changelog
  • packages/mp/pyproject.toml
    • Updated the project version from 1.28.7 to 1.28.8.
  • packages/mp/src/mp/core/data_models/integrations/action/metadata.py
    • Imported EntityType from .ai.entity_types.
    • Added entity_types: list[EntityType] to the AiFields NamedTuple.
    • Added EntitiesTypes: NotRequired[list[str] | None] to BuiltActionMetadata.
    • Added entities_types: NotRequired[list[str]] to NonBuiltActionMetadata.
    • Added entities_types: list[EntityType] to the ActionMetadata class.
    • Modified _from_built to parse EntitiesTypes.
    • Modified _from_non_built to parse entities_types.
    • Modified to_built to include EntitiesTypes in the built metadata.
    • Updated _get_ai_fields to initialize empty_results with entity_types=[].
    • Added entity_types=ai_meta.entity_usage.entity_types to the AiFields return in _get_ai_fields.
  • packages/mp/uv.lock
    • Updated the coverage package version from 7.13.3 to 7.13.4 and its associated hashes.
    • Updated the mp package version from 1.28.7 to 1.28.8 and its associated hashes.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new EntityUsage field to the action metadata, primarily affecting packages/mp/src/mp/core/data_models/integrations/action/metadata.py. While the overall logic for incorporating the new field is sound, I've identified some naming inconsistencies with the new attributes (EntitiesTypes and entities_types). My review includes suggestions to align these names with existing conventions and improve code readability and maintainability. The dependency updates appear to be standard version bumps.

@TalShafir1

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two main features: a new EntityUsage field for action metadata to improve AI-based descriptions, and a self-update mechanism for the mp CLI tool. The changes for EntityUsage are well-integrated throughout the data models. The new mp self update command and the automatic background update check are valuable additions for tool maintenance. The implementation is solid, with new tests for the update checker. I have a couple of suggestions to improve maintainability and robustness.

@TalShafir1

Copy link
Copy Markdown
Member Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces two significant improvements. First, it adds a new EntityUsage field to the action metadata, which is thoroughly documented and integrated into the data models. Second, it implements a background update checker and a mp self update command, which is a great usability enhancement for keeping the tool current. The implementation is robust, using a background thread and handling potential errors gracefully. New unit tests for the update checker are also included. I have a couple of minor suggestions to improve code clarity and remove potentially unused code.

Comment thread packages/mp/src/mp/main.py Resolved
@TalShafir1 TalShafir1 changed the title Update built action to include new field: EntityUsage Update built action to include new field: EntityUsage, Add mp self update, add mp --version Feb 10, 2026
Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com>
Removed the initialization function and direct app call from the main function.

Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com>
Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com>
Signed-off-by: Tal Shafir <94114984+TalShafir1@users.noreply.github.com>
@TalShafir1 TalShafir1 added Enhancement New feature or request mp mp related change New mp Feature labels Feb 10, 2026
AmitJ98
AmitJ98 previously approved these changes Feb 10, 2026
@TalShafir1
TalShafir1 merged commit 2262d25 into main Feb 10, 2026
31 checks passed
@TalShafir1
TalShafir1 deleted the mp/add-entity-types-to-actiondef branch February 10, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request mp mp related change New mp Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants