// description: Create one Lead, seed it, and open its native terminal. // requires: properties-capable lmctl (PROPS; standalone lmscript) // Provider/model properties come from init.toml; Directory/NonInteractive are invocation facts. file = path_join(Directory, "solo.lmctl"); for (n = 2; file_exists(file); n = n + 1) { file = path_join(Directory, f"solo{n}.lmctl"); } text = f"""# Solo _MEMBER_ alias=Lead provider={json_stringify(PROPS.Provider1.provider)} model={json_stringify(PROPS.Provider1.model1)} """; write_file_exclusive(file, text); println(f"Wrote {file}"); r = lm_seed(file); require(r.status == "ok", f"Could not seed {file}"); println(f"Resume: {cmd_render(["lmctl", "terminal", file, "Lead"], "posix")}"); println(f"Prompt: {cmd_render(["lmctl", "prompt", file, "Lead", "your next prompt"], "posix")}"); if (!NonInteractive) { r = lm_terminal(file, "Lead"); if (r.code != 0) { lm_exit(r.code); } }