Overview of Optique runtime context systems
Optique provides two systems for handling runtime data that is not part of command-line arguments (e.g., config files, environment variables, or shared locale settings):
- Annotations: A low-level primitive for injecting runtime data directly into parsers. Use this for direct control or when implementing a source context.
- Source Context: A high-level system for composing multiple data sources with automatic priority handling and two-phase parsing. Use this when building new data sources (e.g., a secrets manager).
Annotations are non-invasive, symbol-keyed for type safety and conflict avoidance, and are accessed via low-level APIs like parse(), parseSync(), and parseAsync().