Search before asking
Description
Summary
This umbrella issue tracks the CEL (Common Expression Language) action condition filtering work across the design discussion and follow-up pull requests. The change introduces an EventType constants/registry, unifies the @action / @Action trigger entry, and adds an ActionRouter that combines typed routing with CEL evaluation in both Java and Python.
Design Discussion
Pull Requests
The work ships as a four-PR stack and must merge in order (PR1 → PR2 → PR3 → PR4).
Current Status
- All four PRs are pending (will be opened sequentially as each parent merges).
Scope
- Public API rename:
@Action(listenEventTypes = …) → @Action(…); @action(*listen_events) → @action(*trigger_conditions)
- New
EventType constants and runtime registry for built-in and user-defined event types (Java + Python)
- CEL plan-time classifier (
PlanCelClassifier): bare-ident → TypeMatch, otherwise → CelExpression
- CEL whitelist: only the
has macro is allowed; exists / exists_one / all / filter / map are rejected
- AST rewriter that folds
EventType.X, normalises type-equality aliases, qualifies bare identifiers under attributes., and rebuilds has calls
CelExpressionFacade (Java) / cel_facade (Python) compile pipeline with a process-wide LRU program cache
ActionRouter two-phase routing: typed-index fast path + CEL slow path, deduped across the union
- Wiring into
ActionExecutionOperator (Java) and LocalRunner (Python)
- JSON serialization:
listen_event_types → trigger_conditions, with backward-compat fallback in both deserializers
- Cross-language conformance fixture (
cel_conformance_cases.json, disallowed-macros.txt) plus a CI workflow that diffs them and runs both evaluators
- User documentation in
docs/content/docs/development/workflow_agent.md
Notes
- This issue is intended as a tracking umbrella for the work split across discussion and the four PRs above.
- Detailed design rationale (why CEL over alternatives, the supported expression subset, the macro whitelist) lives in [Discussion] Trigger action by Event Field Values #726 and should not be duplicated in each PR.
- This is an API-breaking change:
@Action(listenEventTypes = …) no longer compiles. Migration is mechanical and covered in the PR1 description and the migrated examples.
Are you willing to submit a PR?
Search before asking
Description
Summary
This umbrella issue tracks the CEL (Common Expression Language) action condition filtering work across the design discussion and follow-up pull requests. The change introduces an
EventTypeconstants/registry, unifies the@action/@Actiontrigger entry, and adds anActionRouterthat combines typed routing with CEL evaluation in both Java and Python.Design Discussion
Pull Requests
The work ships as a four-PR stack and must merge in order (PR1 → PR2 → PR3 → PR4).
[plan][runtime][java] Add CEL Action condition filtering#TBD-PR2[plan][runtime][python] Add CEL Action condition filtering#TBD-PR3[docs] Document CEL Action condition filtering#TBD-PR4Current Status
Scope
@Action(listenEventTypes = …)→@Action(…);@action(*listen_events)→@action(*trigger_conditions)EventTypeconstants and runtime registry for built-in and user-defined event types (Java + Python)PlanCelClassifier): bare-ident →TypeMatch, otherwise →CelExpressionhasmacro is allowed;exists/exists_one/all/filter/mapare rejectedEventType.X, normalises type-equality aliases, qualifies bare identifiers underattributes., and rebuildshascallsCelExpressionFacade(Java) /cel_facade(Python) compile pipeline with a process-wide LRU program cacheActionRoutertwo-phase routing: typed-index fast path + CEL slow path, deduped across the unionActionExecutionOperator(Java) andLocalRunner(Python)listen_event_types→trigger_conditions, with backward-compat fallback in both deserializerscel_conformance_cases.json,disallowed-macros.txt) plus a CI workflow that diffs them and runs both evaluatorsdocs/content/docs/development/workflow_agent.mdNotes
@Action(listenEventTypes = …)no longer compiles. Migration is mechanical and covered in the PR1 description and the migrated examples.Are you willing to submit a PR?