()
| 784 | } |
| 785 | |
| 786 | pub fn program_repo_map() -> ProgramTemplate { |
| 787 | let mut template = ProgramTemplate::new( |
| 788 | "program_repo_map", |
| 789 | "Map the repository shape with root listing and key project files.", |
| 790 | ) |
| 791 | .with_parameter(ProgramParameter::optional( |
| 792 | "path", |
| 793 | "Workspace-relative path to map.", |
| 794 | serde_json::json!("."), |
| 795 | )) |
| 796 | .with_step( |
| 797 | ProgramStepTemplate::new("ls", serde_json::json!({ "path": "{{path}}" })) |
| 798 | .with_label("list_root"), |
| 799 | ); |
| 800 | |
| 801 | for pattern in [ |
| 802 | "Cargo.toml", |
| 803 | "package.json", |
| 804 | "pyproject.toml", |
| 805 | "go.mod", |
| 806 | "README.md", |
| 807 | "AGENTS.md", |
| 808 | ] { |
| 809 | template = template.with_step( |
| 810 | ProgramStepTemplate::new( |
| 811 | "glob", |
| 812 | serde_json::json!({ |
| 813 | "path": "{{path}}", |
| 814 | "pattern": pattern |
| 815 | }), |
| 816 | ) |
| 817 | .with_label(format!("find_{pattern}")), |
| 818 | ); |
| 819 | } |
| 820 | |
| 821 | template |
| 822 | } |
| 823 | |
| 824 | fn summarize_program_result(program: &Program, success: bool, completed_steps: usize) -> String { |
| 825 | let status = if success { "completed" } else { "stopped" }; |
nothing calls this directly
no test coverage detected