// description: Create a Lead and Reviewer, seed both, and open the Lead's terminal. // requires: properties-capable lmctl (PROPS; standalone lmscript) // Lead uses Provider1.model1; Reviewer uses Provider2.model1 (the former Model2 slot). file = path_join(Directory, "review.lmctl"); for (n = 2; file_exists(file); n = n + 1) { file = path_join(Directory, f"review{n}.lmctl"); } text = f"""# Lead and Reviewer _MEMBER_ alias=Lead provider={json_stringify(PROPS.Provider1.provider)} model={json_stringify(PROPS.Provider1.model1)} _MEMBER_ alias=Reviewer provider={json_stringify(PROPS.Provider2.provider)} model={json_stringify(PROPS.Provider2.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); } }