falyx-parser #5
Reference in New Issue
Block a user
No description provided.
Delete Branch "falyx-parser"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR completes a major Falyx runtime refactor focused on command execution, routed parsing, reusable command/action binding, and standalone command execution.
Key changes include:
CommandExecutoras the shared execution engine for resolved commandsCommandRunnerfor running a singleCommandoutside a fullFalyxappCommand.build()andCommand.clone_with_overrides()as the canonical command construction and rebinding pathsclone()support acrossBaseActionimplementations so commands can be safely reused without mutating original action instances__main__.pyInvocationContextand styled display segments for context-aware usage/help/TLDR renderingCompletionRouteand improve namespace-aware completionsOptionsManagernamespacesWhy
Falyx now has a cleaner separation of concerns:
Falyxowns routingCommandowns argument resolution and command-local behaviorCommandExecutorowns shared execution lifecycleCommandRunnerowns standalone single-command executionOptionsManagerowns scoped runtime stateThis makes command behavior more consistent across CLI mode, menu mode, nested namespaces, previews, help rendering, and standalone command runners.
Notable Behavior Changes
Commandinstances are cloned and rebound to the receiving runtime.CommandRunner.from_command()also clones the provided command before binding runner-specific state.