Repository navigation
feat(automations): fire on any entity of a type, or names matching a pattern - #686
Merged
Merged
Conversation
…pattern A trigger's where, an If and a condition node's tree can test the entities an activity mentions with the new `mentions` test: any entity of a type (PERSON, or its label in any case), a name with * and ? wildcards matched in linear time, or an id. A processed asset is now tagged with its fifty most mentioned entities (as many as an activity holds) instead of ten, and every entity tag carries its entityType. Conditions saved before pass as they did. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QFUNzy1QZy5HhKAyJxTAYJ
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.
Requested by Adeel · project thread
Description
Before: an automation could fire on one named entity only, and a processed asset was tagged with just its ten most mentioned entities, with no entity type.
After: a trigger's where, an If and a condition node's tree can test what an activity mentions with the new
mentionstest.{"type": "PERSON"}fires on any person (the type or its label, in any case),{"name": "Acme*"}fires on names matching*and?wildcards, and{"id": "lens:entity/9"}fires on one entity. A processed asset is now tagged with its fifty most mentioned entities, and every entity tag carries itsentityType. Conditions saved before work as they did.How:
domain/match.pygains thementionsoperator, with a wildcard matcher that runs in linear time.events_content.pytags up to fifty entities with their type. The MCP tool descriptions name the new test.Motivation and Context
Item from the personal feature plan sheet (automations on entity mentions).
Screenshots (if appropriate):
n/a
Steps to reproduce (if appropriate):
Make an automation whose trigger is "asset processed" with where
{"op": "mentions", "value": {"type": "PERSON"}}, then import a recording that names a person: the automation runs.Types of changes
!in the title)Checklist:
make hookschecks it on commit).tests/domain/test_automation_mentions.py).docs/accordingly (docs/automations.md#operators).## UnreleasedinCHANGELOG.md. Written aschangelog.d/automation-mentions.md, per build(release): changelog fragments in changelog.d/ instead of one Unreleased section #581.Done questions (AGENTS.md)
mentions..envedit or manual step.docs/requirements.mdname the checks.make openapi). No API shape change.Local CI: the container runs several times slower than usual, so I ran the changed tests directly: all automation, events and MCP tests plus
test_setup_assistant.py(139 passed), and ruff check and format are clean. GitHub CI decides the merge.Generated by Claude Code