Use Cases
Feature Toggles
Mark tasks as “experimental” or “deprecated” and filter at runtime
API Exposure
Tag tasks as “public” to expose them via HTTP tunnels
Access Control
Tag resources/tasks with required roles or permissions
Discovery
Find all tasks with a specific tag for batch operations
Basic Usage
Create tags and apply them to components:Querying by Tags
Find components with specific tags at runtime:Tags with Configuration
Tags can carry typed configuration:Tag Contracts (Type Enforcement)
Enforce that tasks using a tag conform to specific input/output shapes:<TConfig, TEnforceIn, TEnforceOut>
- TConfig: Configuration passed via
.with() - TEnforceIn: Required input properties for tasks
- TEnforceOut: Required output properties for tasks
Middleware Based on Tags
Apply middleware to all tasks with a specific tag:Resource Tags
Tags work on resources too:Tag Metadata
Add rich metadata to tags:HTTP Tunnel Integration
Tags integrate with HTTP tunnels for selective exposure:Store API Reference
Find all tasks with a specific tag
Find all resources with a specific tag
Get all registered tags
Validation with Config Schema
Validate tag configuration at registration time:Best Practices
Use Semantic Names
Name tags clearly:
app.tags.publicApi, not myTagDocument Tag Meaning
Use
.meta() to explain what a tag signifiesKeep Tag Config Simple
Don’t pack complex state into tag config—use resources for that
Use Type Contracts
Enforce input/output contracts with
TEnforceIn and TEnforceOutCommon Patterns
Feature Flags
Batch Operations
See Also
- Type Contracts - Enforce input/output shapes with tags
- Middleware - Apply middleware based on tags
- HTTP Tunnels - Expose tasks by tag
- Testing - Query tasks by tag for test setup