feat(LocalRunnerClient): support executing origin actions

Context:
Origin actions are generated by DynamicActionGenerator and may optionally be
persistently serialized. This feature adds the basic execution flow for origin
actions within LocalRunnerClient.

Notes:
The current mapping between action files and their extensions is hardcoded. This should later be replaced with a configurable registry or loaded dynamically
during application startup.
This commit is contained in:
2025-12-16 21:59:53 +08:00
parent 488246525f
commit 1947f25ed6
3 changed files with 98 additions and 3 deletions

View File

@@ -0,0 +1,24 @@
import sys
def parse_args(argv):
"""
将 --key=value 解析成 dict
"""
params = {}
for arg in argv:
if arg.startswith("--") and "=" in arg:
key, value = arg[2:].split("=", 1)
params[key] = value
return params
def main():
params = parse_args(sys.argv[1:])
name = params.get("name", "World")
print(f"Hello {name}!")
if __name__ == "__main__":
main()