mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-04-24 13:54:59 +00:00
- Implement core components: CLI argument parsing, environment loading, GitHub service creation, and logging configuration. - Add support for OpenAI client setup and model resolution. - Develop SDLC context loader from GitHub and repository files. - Implement workflow context and engine builders. - Introduce major workflow packages: `game_tick_loop` and `contextual_iterative_loop`. - Update localization files with new package descriptions and labels. - Streamline web navigation by loading items from a dedicated JSON file.
23 lines
758 B
Python
23 lines
758 B
Python
"""Resolve workflow bindings and coercions."""
|
|
from .value_helpers import ValueHelpers
|
|
|
|
|
|
class InputResolver:
|
|
"""Resolve bindings in workflow inputs."""
|
|
def __init__(self, store: dict):
|
|
self.store = store
|
|
|
|
def resolve_inputs(self, inputs: dict) -> dict:
|
|
"""Resolve bindings for every input."""
|
|
return {key: self.resolve_binding(value) for key, value in (inputs or {}).items()}
|
|
|
|
def resolve_binding(self, value):
|
|
"""Resolve a single binding value."""
|
|
if isinstance(value, str) and value.startswith("$"):
|
|
return self.store.get(value[1:])
|
|
return value
|
|
|
|
def coerce_bool(self, value) -> bool:
|
|
"""Coerce values into booleans."""
|
|
return ValueHelpers.coerce_bool(value)
|