[PLT-2917] feat: expose toolkit trigger declarations - #909
TheMostlyGreat wants to merge 20 commits into
Conversation
…validation naming the field (K3WQ7N) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s validation naming the slug (K3WQ7N) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…WQ7N GREEN) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…fails declaration validation (K3WQ7N) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tion time (K3WQ7N GREEN) Adds the reference jsonschema lib to arcade-core; validator_for + check_schema rejects malformed schemas inside pydantic field validation. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…with complete fields (K3WQ7N) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…s (K3WQ7N GREEN)
TriggerTypesComponent beside CatalogComponent; object envelope
{trigger_types: [...]} so the surface can grow, unlike the bare-array
/worker/tools response. register_trigger_types validates the combined
set across toolkits. Route-inventory test gains the new default route.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…[]} (K3WQ7N) Behavior emerged with d997742's minimal GREEN; pinned here as a regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…401 (K3WQ7N) Auth rides the route-default JWT middleware from d997742; pinned as a regression test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ort serve an empty envelope (K3WQ7N) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lope (K3WQ7N GREEN)
Non-abstract so existing third-party Worker implementations keep
working — the additive-capability pattern Router.add_mount already
establishes. No-trigger workers serve {trigger_types: []}.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… add types-jsonschema (K3WQ7N)
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
Greptile SummaryThe PR adds validated toolkit trigger declarations and exposes them through the authenticated worker API while preserving compatibility with workers that do not support triggers.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| libs/arcade-core/arcade_core/triggers.py | Defines trigger declaration models and validates both configuration and payload JSON schemas, completing the prior schema-validation fix. |
| libs/arcade-core/arcade_core/toolkit.py | Discovers conventional toolkit trigger declaration modules and converts their entries into validated models. |
| libs/arcade-core/arcade_core/catalog.py | Aggregates toolkit trigger declarations while rejecting duplicate slugs. |
| libs/arcade-serve/arcade_serve/core/base.py | Registers validated trigger declarations and exposes them through the worker interface. |
| libs/arcade-serve/arcade_serve/core/components.py | Adds the worker trigger-declaration endpoint component. |
| libs/arcade-mcp-server/arcade_mcp_server/worker.py | Carries catalog trigger declarations into the integrated worker. |
| libs/arcade-mcp-server/pyproject.toml | Raises dependency floors to package versions containing the trigger APIs, completing the prior compatibility fix. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Toolkit trigger_types.py] --> B[Toolkit discovery and validation]
B --> C[ToolCatalog aggregation]
C --> D[Integrated MCP worker registration]
D --> E[Authenticated GET /worker/triggers]
F[Worker without trigger support] --> G[Empty trigger_types envelope]
Reviews (2): Last reviewed commit: "style(triggers): format declaration load..." | Re-trigger Greptile
|
Addressed all three review findings in 38c8d09: both JSON Schemas now validate at load time, trigger imports use the resolved package name, and all changed libraries have publishable patch versions with dependency floors matching the new APIs. Added regression coverage; 99 focused tests, Ruff, and mypy pass locally. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 30fe91c. Configure here.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
This pull request has been automatically marked as stale because it has had no activity for 14 days. It will be closed in 14 days if no further activity occurs. If this is still relevant, please leave a comment or remove the stale label. |

Summary
GET /worker/triggersendpoint<toolkit>.trigger_types.trigger_typesautomaticallyToolCataloginto the integrated MCP workerVerification
servicetitan.job.completedthrough/worker/triggersTracks the SDK/worker portion of Arcade monorepo ticket J95ZCA.
Note
Medium Risk
New worker API surface and load-time validation can block toolkit startup on bad trigger declarations or slug collisions across toolkits; auth behavior on
/worker/triggersmust match other worker routes.Overview
Adds toolkit-declared trigger types end to end: a new
TriggerTypemodel in arcade-core (webhook/poll metadata, JSON Schema validation for config/payload, duplicate-slug checks at load time) plus optional auto-load from<package>.trigger_types.ToolCatalog now merges trigger types when toolkits are registered, rejects duplicate slugs as
ToolkitLoadError, and skips trigger accumulation when a toolkit is disabled viaARCADE_DISABLED_TOOLKITS(disabled-toolkit matching now usestoolkit.nameinstead ofstr(toolkit)).arcade-serve exposes authenticated
GET /worker/triggers(default empty list for workers that do not overrideget_trigger_types). The integrated MCP worker forwardscatalog.trigger_typesafter startup. Package bumps: arcade-core 4.11.1 (+jsonschema), arcade-serve 3.4.3, arcade-mcp-server 1.26.1.Reviewed by Cursor Bugbot for commit 900c42b. Bugbot is set up for automated code reviews on this repo. Configure here.