lemming-cli 0.8.1__tar.gz → 0.8.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/PKG-INFO +11 -7
  2. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/README.md +10 -6
  3. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/SKILL.md +9 -3
  4. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/HOOKS.md +3 -0
  5. lemming_cli-0.8.2/docs/screenshots/dashboard-desktop.png +0 -0
  6. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/screenshots/dashboard-mobile.png +0 -0
  7. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/package-lock.json +4 -4
  8. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/package.json +1 -1
  9. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/pyproject.toml +1 -1
  10. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/main.py +4 -1
  11. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/main_test.py +19 -0
  12. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/operations.py +3 -3
  13. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/operations_test.py +35 -0
  14. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/cli.py +1 -1
  15. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/models.py +18 -1
  16. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/models_test.py +25 -4
  17. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/orchestrator.py +26 -13
  18. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/orchestrator_test.py +49 -0
  19. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts.py +2 -1
  20. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts_test.py +18 -0
  21. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/runner.py +8 -4
  22. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/runner_test.py +84 -0
  23. lemming_cli-0.8.2/src/lemming/web/mancha.js +46 -0
  24. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/uv.lock +1 -1
  25. lemming_cli-0.8.1/docs/screenshots/dashboard-desktop.png +0 -0
  26. lemming_cli-0.8.1/src/lemming/web/mancha.js +0 -58
  27. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.dockerignore +0 -0
  28. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.github/workflows/ci.yml +0 -0
  29. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.github/workflows/publish.yml +0 -0
  30. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.github/workflows/screenshots.yml +0 -0
  31. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.gitignore +0 -0
  32. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.prettierignore +0 -0
  33. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/.prettierrc +0 -0
  34. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/Dockerfile +0 -0
  35. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/LICENSE +0 -0
  36. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/biome.json +0 -0
  37. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docker-compose.yml +0 -0
  38. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/EVALS.md +0 -0
  39. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/WORKSPACE.md +0 -0
  40. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/screenshots/task-log-desktop.png +0 -0
  41. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/docs/screenshots/task-log-mobile.png +0 -0
  42. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/playwright.config.js +0 -0
  43. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/__init__.py +0 -0
  44. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/__init__.py +0 -0
  45. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/auth.py +0 -0
  46. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/auth_test.py +0 -0
  47. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/config.py +0 -0
  48. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/config_test.py +0 -0
  49. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/conftest.py +0 -0
  50. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/context.py +0 -0
  51. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/context_test.py +0 -0
  52. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/directories.py +0 -0
  53. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/directories_test.py +0 -0
  54. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/files.py +0 -0
  55. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/files_test.py +0 -0
  56. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/hooks.py +0 -0
  57. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/hooks_test.py +0 -0
  58. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/logging.py +0 -0
  59. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/logging_test.py +0 -0
  60. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/loop.py +0 -0
  61. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/loop_test.py +0 -0
  62. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/main.py +0 -0
  63. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/main_test.py +0 -0
  64. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/tasks.py +0 -0
  65. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/api/tasks_test.py +0 -0
  66. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/artifact_test.py +0 -0
  67. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/brief_test.py +0 -0
  68. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/__init__.py +0 -0
  69. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/artifact.py +0 -0
  70. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/brief.py +0 -0
  71. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/config.py +0 -0
  72. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/config_test.py +0 -0
  73. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/exec_cli.py +0 -0
  74. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/exec_cli_test.py +0 -0
  75. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/goal.py +0 -0
  76. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/goal_test.py +0 -0
  77. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/hooks.py +0 -0
  78. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/hooks_test.py +0 -0
  79. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/machine_output_test.py +0 -0
  80. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/progress.py +0 -0
  81. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/progress_test.py +0 -0
  82. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/readability_cli.py +0 -0
  83. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/readability_cli_test.py +0 -0
  84. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/skill.py +0 -0
  85. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/skill_test.py +0 -0
  86. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/stop_test.py +0 -0
  87. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/tasks.py +0 -0
  88. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/cli/tasks_test.py +0 -0
  89. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/conftest.py +0 -0
  90. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/__init__.py +0 -0
  91. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/__main__.py +0 -0
  92. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/cli_test.py +0 -0
  93. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/container.py +0 -0
  94. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/container_test.py +0 -0
  95. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/fixtures.py +0 -0
  96. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/fixtures_test.py +0 -0
  97. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/harness.py +0 -0
  98. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/harness_test.py +0 -0
  99. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/metrics.py +0 -0
  100. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/metrics_test.py +0 -0
  101. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/base/README.md +0 -0
  102. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/base/calc/__init__.py +0 -0
  103. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/base/calc/legacy.py +0 -0
  104. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/base/calc/ops.py +0 -0
  105. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/base/calc/ops_test.py +0 -0
  106. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/clean/calc/ops.py +0 -0
  107. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/clean/calc/ops_test.py +0 -0
  108. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/dead-code/calc/ops.py +0 -0
  109. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/dead-code/calc/ops_test.py +0 -0
  110. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops.py +0 -0
  111. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/duplicated-behavior/calc/ops_test.py +0 -0
  112. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/false-reuse/calc/limits.py +0 -0
  113. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/false-reuse/calc/limits_test.py +0 -0
  114. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/lint-debt/calc/ops.py +0 -0
  115. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/readability/lint-debt/calc/ops_test.py +0 -0
  116. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/add-only/README.md +0 -0
  117. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/add-only/calc/__init__.py +0 -0
  118. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/add-only/calc/ops.py +0 -0
  119. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/add-only/calc/ops_test.py +0 -0
  120. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/buggy-subtract/README.md +0 -0
  121. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/__init__.py +0 -0
  122. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops.py +0 -0
  123. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/buggy-subtract/calc/ops_test.py +0 -0
  124. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/full-ops/README.md +0 -0
  125. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/full-ops/calc/__init__.py +0 -0
  126. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/full-ops/calc/ops.py +0 -0
  127. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/full-ops/calc/ops_test.py +0 -0
  128. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/README.md +0 -0
  129. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/calc/__init__.py +0 -0
  130. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli.py +0 -0
  131. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/calc/cli_test.py +0 -0
  132. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops.py +0 -0
  133. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/roadmap/unwired-cli/calc/ops_test.py +0 -0
  134. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/task/hidden/stats/summary_hidden_test.py +0 -0
  135. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/task/summary/README.md +0 -0
  136. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/task/summary/stats/__init__.py +0 -0
  137. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/task/summary/stats/summary.py +0 -0
  138. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/projects/task/summary/stats/summary_test.py +0 -0
  139. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/readability.py +0 -0
  140. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/readability_test.py +0 -0
  141. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/report.py +0 -0
  142. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/report_test.py +0 -0
  143. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/roadmap.py +0 -0
  144. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/roadmap_test.py +0 -0
  145. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/scenarios.py +0 -0
  146. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/scenarios_test.py +0 -0
  147. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/suites.py +0 -0
  148. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/task.py +0 -0
  149. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/task_test.py +0 -0
  150. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/trial.py +0 -0
  151. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/evals/trial_test.py +0 -0
  152. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/hooks.py +0 -0
  153. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/hooks_test.py +0 -0
  154. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/integration_test.py +0 -0
  155. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/main.py +0 -0
  156. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/main_test.py +0 -0
  157. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/paths.py +0 -0
  158. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/paths_test.py +0 -0
  159. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/persistence.py +0 -0
  160. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/persistence_test.py +0 -0
  161. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts/hooks/50-readability.md +0 -0
  162. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts/hooks/60-testing.md +0 -0
  163. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts/hooks/70-ux.md +0 -0
  164. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts/hooks/90-roadmap.md +0 -0
  165. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/prompts/taskrunner.md +0 -0
  166. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/providers.py +0 -0
  167. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/providers_test.py +0 -0
  168. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/scope.py +0 -0
  169. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/scope_test.py +0 -0
  170. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/shutdown.py +0 -0
  171. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/shutdown_integration_test.py +0 -0
  172. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/shutdown_test.py +0 -0
  173. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/__init__.py +0 -0
  174. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/lifecycle.py +0 -0
  175. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/lifecycle_test.py +0 -0
  176. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/limits.py +0 -0
  177. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/operations.py +0 -0
  178. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/operations_test.py +0 -0
  179. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/progress.py +0 -0
  180. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/progress_test.py +0 -0
  181. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/queries.py +0 -0
  182. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/tasks/queries_test.py +0 -0
  183. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/dashboard.spec.js +0 -0
  184. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/dashboard.test.js +0 -0
  185. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/favicon.js +0 -0
  186. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/favicon.spec.js +0 -0
  187. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/files.html +0 -0
  188. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/files.spec.js +0 -0
  189. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/index.html +0 -0
  190. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/index.js +0 -0
  191. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/logs.html +0 -0
  192. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/logs.test.js +0 -0
  193. {lemming_cli-0.8.1 → lemming_cli-0.8.2}/src/lemming/web/screenshots.spec.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lemming-cli
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: An autonomous, iterative task runner for AI coding agents.
5
5
  Project-URL: Homepage, https://github.com/owahltinez/lemming
6
6
  Project-URL: Repository, https://github.com/owahltinez/lemming
@@ -91,7 +91,8 @@ Start the autonomous loop.
91
91
 
92
92
  ```bash
93
93
  # Run using the project's configured agent (defaults to the first
94
- # supported runner found on PATH: agy, opencode, claude, or codex)
94
+ # supported runner found on PATH or in ~/.local/bin: agy, opencode,
95
+ # claude, or codex)
95
96
  lemming run
96
97
 
97
98
  # Flags passed after -- are sent directly to the underlying runner
@@ -150,9 +151,10 @@ Reviews may edit the working directory. The built-in readability review
150
151
  intentionally applies fixes, and testing may repair production code or tests.
151
152
  UX is instructed to remain advisory, but its prompt and `--no-yolo` do not
152
153
  enforce filesystem isolation. A global review override may perform any actions
153
- its prompt requests. When isolation is required, follow the working-copy
154
- guidance below and pass a separate VCS-managed working copy with
155
- `lemming -C <working-copy> exec --review ...`.
154
+ its prompt requests. There is no read-only review mode: runners keep write
155
+ access, so a prompt-only flag could not be enforced. When isolation is required,
156
+ follow the working-copy guidance below and pass a separate VCS-managed working
157
+ copy with `lemming -C <working-copy> exec --review ...`.
156
158
 
157
159
  Each run is self-contained: nothing is read from the project's roadmap or its
158
160
  local hooks, it runs only the requested task and reviews, and its state
@@ -466,7 +468,7 @@ These come before the subcommand and apply to all of them.
466
468
  - `-f/--file`: Read the description from a file, or `-` for stdin. Unlike
467
469
  `add`, there is no length cap.
468
470
  - `--review <names>`: Reviews to run after the task, comma-separated or
469
- repeated; `all` selects every one. With no description, only the reviews
471
+ repeated; `'*'` selects every one. With no description, only the reviews
470
472
  run. Reviews may edit the working directory. Hooks that revise the roadmap
471
473
  cannot be selected.
472
474
  - `--scope <path|range>`: What the reviews look at. Paths pass through; a git
@@ -527,7 +529,9 @@ lemming -C ~/src/other-project status
527
529
  `-C` works whether or not the target keeps a `tasks.yml` in its repo, so you
528
530
  never have to know where its isolated state lives. Because it changes the
529
531
  working directory, everything else follows too: the target's `.env`, its
530
- `.lemming/hooks`, and the directory the runner executes in.
532
+ `.lemming/hooks`, and the directory the runner executes in. With a
533
+ `--tasks-file` anywhere other than the target's root, `.env` and the runner's
534
+ directory still follow `-C`, but hooks follow the tasks file.
531
535
 
532
536
  When an agent files a task this way from inside a `lemming run`, the new task
533
537
  records the task it came from via `parent` and `parent_tasks_file`. The
@@ -71,7 +71,8 @@ Start the autonomous loop.
71
71
 
72
72
  ```bash
73
73
  # Run using the project's configured agent (defaults to the first
74
- # supported runner found on PATH: agy, opencode, claude, or codex)
74
+ # supported runner found on PATH or in ~/.local/bin: agy, opencode,
75
+ # claude, or codex)
75
76
  lemming run
76
77
 
77
78
  # Flags passed after -- are sent directly to the underlying runner
@@ -130,9 +131,10 @@ Reviews may edit the working directory. The built-in readability review
130
131
  intentionally applies fixes, and testing may repair production code or tests.
131
132
  UX is instructed to remain advisory, but its prompt and `--no-yolo` do not
132
133
  enforce filesystem isolation. A global review override may perform any actions
133
- its prompt requests. When isolation is required, follow the working-copy
134
- guidance below and pass a separate VCS-managed working copy with
135
- `lemming -C <working-copy> exec --review ...`.
134
+ its prompt requests. There is no read-only review mode: runners keep write
135
+ access, so a prompt-only flag could not be enforced. When isolation is required,
136
+ follow the working-copy guidance below and pass a separate VCS-managed working
137
+ copy with `lemming -C <working-copy> exec --review ...`.
136
138
 
137
139
  Each run is self-contained: nothing is read from the project's roadmap or its
138
140
  local hooks, it runs only the requested task and reviews, and its state
@@ -446,7 +448,7 @@ These come before the subcommand and apply to all of them.
446
448
  - `-f/--file`: Read the description from a file, or `-` for stdin. Unlike
447
449
  `add`, there is no length cap.
448
450
  - `--review <names>`: Reviews to run after the task, comma-separated or
449
- repeated; `all` selects every one. With no description, only the reviews
451
+ repeated; `'*'` selects every one. With no description, only the reviews
450
452
  run. Reviews may edit the working directory. Hooks that revise the roadmap
451
453
  cannot be selected.
452
454
  - `--scope <path|range>`: What the reviews look at. Paths pass through; a git
@@ -507,7 +509,9 @@ lemming -C ~/src/other-project status
507
509
  `-C` works whether or not the target keeps a `tasks.yml` in its repo, so you
508
510
  never have to know where its isolated state lives. Because it changes the
509
511
  working directory, everything else follows too: the target's `.env`, its
510
- `.lemming/hooks`, and the directory the runner executes in.
512
+ `.lemming/hooks`, and the directory the runner executes in. With a
513
+ `--tasks-file` anywhere other than the target's root, `.env` and the runner's
514
+ directory still follow `-C`, but hooks follow the tasks file.
511
515
 
512
516
  When an agent files a task this way from inside a `lemming run`, the new task
513
517
  records the task it came from via `parent` and `parent_tasks_file`. The
@@ -139,9 +139,10 @@ a clean tree stops the run rather than reviewing everything.
139
139
  Reviews may edit the working directory. Readability intentionally applies fixes,
140
140
  and testing may repair production code or tests. UX is instructed to remain
141
141
  advisory, but its prompt and `--no-yolo` do not enforce filesystem isolation. A
142
- global review override may perform any actions its prompt requests. When
143
- isolation is required, use a separate VCS-managed working copy and pass it with
144
- the global `-C` option, as in the example above.
142
+ global review override may perform any actions its prompt requests. There is no
143
+ read-only review mode: runners keep write access, so a prompt-only flag could
144
+ not be enforced. When isolation is required, use a separate VCS-managed working
145
+ copy and pass it with the global `-C` option, as in the example above.
145
146
 
146
147
  ## Drive a roadmap
147
148
 
@@ -206,6 +207,11 @@ lemming logs <id> | tail -n 30 # never the whole log
206
207
  A task is stuck when its run time approaches the limit with no new progress
207
208
  entries and the log tail shows the same step repeating. Otherwise leave it.
208
209
 
210
+ If your harness backgrounds long commands and sleeps until they exit, a
211
+ backgrounded `run --until` hides a stuck task until it exhausts its retries.
212
+ Pair it with a wake-up near each task's time limit that runs the checks above;
213
+ if the task is stuck, `lemming cancel <id>` and `add` smaller tasks in its place.
214
+
209
215
  Adjust the queue while it runs — new tasks are picked up automatically:
210
216
 
211
217
  ```sh
@@ -19,6 +19,9 @@ more **orchestrator hooks**. Each hook:
19
19
  execution log, and any commands it runs (e.g. `lemming add`, `lemming edit`)
20
20
  are executed against the roadmap.
21
21
 
22
+ Each hook run is killed after 15 minutes, or after the task's time limit if
23
+ that is shorter. A time limit of 0 disables both.
24
+
22
25
  ## Naming Convention
23
26
 
24
27
  Hooks are Markdown files discovered from the filesystem, and udev-style filename
@@ -12,7 +12,7 @@
12
12
  "@biomejs/biome": "^2.5.9",
13
13
  "@playwright/test": "^1.62.1",
14
14
  "jsdom": "^30.0.1",
15
- "mancha": "^0.25.1",
15
+ "mancha": "^0.28.0",
16
16
  "playwright": "^1.62.1",
17
17
  "prettier": "^3.9.6"
18
18
  }
@@ -1042,9 +1042,9 @@
1042
1042
  }
1043
1043
  },
1044
1044
  "node_modules/mancha": {
1045
- "version": "0.25.1",
1046
- "resolved": "https://registry.npmjs.org/mancha/-/mancha-0.25.1.tgz",
1047
- "integrity": "sha512-S53J9sCoyKM9vMH9da4j6VHyQKyUP2K/8E/n0xZF+38svzhj3u+Slfuop24JoMMZzINpS3L+cHgbUk3EFsNTkQ==",
1045
+ "version": "0.28.0",
1046
+ "resolved": "https://registry.npmjs.org/mancha/-/mancha-0.28.0.tgz",
1047
+ "integrity": "sha512-Yt3M0jSXCpi5ZARRWFicE56I8pCak29LuZCmKDKcAQk47wgsWaEpiHDIhD6dghaxzhVWWxI6O88m+8sWTlDOQQ==",
1048
1048
  "dev": true,
1049
1049
  "license": "MIT",
1050
1050
  "dependencies": {
@@ -16,7 +16,7 @@
16
16
  "@biomejs/biome": "^2.5.9",
17
17
  "@playwright/test": "^1.62.1",
18
18
  "jsdom": "^30.0.1",
19
- "mancha": "^0.25.1",
19
+ "mancha": "^0.28.0",
20
20
  "playwright": "^1.62.1",
21
21
  "prettier": "^3.9.6"
22
22
  }
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "lemming-cli"
7
- version = "0.8.1"
7
+ version = "0.8.2"
8
8
  description = "An autonomous, iterative task runner for AI coding agents."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -102,7 +102,10 @@ def cli(
102
102
  tasks_file = tasks_file.resolve()
103
103
 
104
104
  # Load .env files (global, then project-level); real env vars always win.
105
- paths.load_dotenv(project_dir=paths.get_working_dir(tasks_file))
105
+ paths.load_dotenv(
106
+ project_dir=project_dir or paths.get_working_dir(tasks_file)
107
+ )
106
108
 
109
+ ctx.obj["PROJECT_DIR"] = project_dir
107
110
  ctx.obj["TASKS_FILE"] = tasks_file
108
111
  ctx.obj["VERBOSE"] = verbose
@@ -124,6 +124,25 @@ class TestProjectDirOption(unittest.TestCase):
124
124
  self.assertEqual(result.exit_code, 0, result.output)
125
125
  self.assertEqual(seen, [self.other])
126
126
 
127
+ def test_loads_project_dir_env_with_external_tasks_file(self):
128
+ # A tasks file in a scratch dir must not move .env discovery off -C.
129
+ scratch = self.here / "scratch"
130
+ scratch.mkdir()
131
+ tasks_file = scratch / "tasks.yml"
132
+ persistence.save_tasks(tasks_file, models.Roadmap())
133
+ env_file = self.other / ".env"
134
+ env_file.write_text("LEMMING_TEST_PROJECT_ENV=repo\n")
135
+ env_file.chmod(0o600)
136
+ self.addCleanup(os.environ.pop, "LEMMING_TEST_PROJECT_ENV", None)
137
+
138
+ result = self.cli_runner.invoke(
139
+ main.cli,
140
+ ["-C", str(self.other), "--tasks-file", str(tasks_file), "status"],
141
+ )
142
+
143
+ self.assertEqual(result.exit_code, 0, result.output)
144
+ self.assertEqual(os.environ.get("LEMMING_TEST_PROJECT_ENV"), "repo")
145
+
127
146
  def test_restores_the_original_working_directory(self):
128
147
  self.cli_runner.invoke(main.cli, ["-C", str(self.other), "status"])
129
148
 
@@ -105,9 +105,6 @@ def run(
105
105
  click.echo(f"Error: {e}")
106
106
  ctx.exit(1)
107
107
 
108
- # Determine the project's working directory
109
- working_dir = paths.get_working_dir(tasks_file)
110
-
111
108
  # Parse environment overrides
112
109
  env_overrides = {}
113
110
  for e in env:
@@ -120,6 +117,9 @@ def run(
120
117
  if env_overrides:
121
118
  os.environ.update(env_overrides)
122
119
 
120
+ # After the overrides, which may move LEMMING_HOME; an explicit -C wins.
121
+ working_dir = ctx.obj["PROJECT_DIR"] or paths.get_working_dir(tasks_file)
122
+
123
123
  # Handle stop requests before claiming work, so a SIGTERM arriving mid-task
124
124
  # takes the runner down instead of orphaning it.
125
125
  shutdown.clear_drain()
@@ -1,4 +1,5 @@
1
1
  import logging.config
2
+ import os
2
3
  import pathlib
3
4
  import shutil
4
5
  import tempfile
@@ -98,6 +99,40 @@ class TestCLIOperations(unittest.TestCase):
98
99
  self.assertEqual(result.exit_code, 0)
99
100
  self.assertEqual(run_loop.call_args.kwargs["max_tasks"], 2)
100
101
 
102
+ def test_run_uses_project_dir_over_external_tasks_file(self):
103
+ with tempfile.TemporaryDirectory() as repo:
104
+ repo_dir = pathlib.Path(repo).resolve()
105
+ with mock.patch.object(
106
+ operations, "run_loop", return_value=True
107
+ ) as run_loop:
108
+ result = self.cli_runner.invoke(
109
+ cli.cli, ["-C", repo] + self.base_args + ["run"]
110
+ )
111
+
112
+ self.assertEqual(result.exit_code, 0, result.output)
113
+ self.assertEqual(run_loop.call_args.kwargs["working_dir"], repo_dir)
114
+
115
+ def test_run_applies_env_before_resolving_working_dir(self):
116
+ # With LEMMING_HOME pointing at the tasks file's dir, the file is
117
+ # isolated state and the runner must stay in the current directory.
118
+ with (
119
+ mock.patch.dict(os.environ),
120
+ mock.patch.object(
121
+ operations, "run_loop", return_value=True
122
+ ) as run_loop,
123
+ ):
124
+ result = self.cli_runner.invoke(
125
+ cli.cli,
126
+ self.base_args
127
+ + ["run", "--env", f"LEMMING_HOME={self.test_dir}"],
128
+ )
129
+
130
+ self.assertEqual(result.exit_code, 0, result.output)
131
+ self.assertEqual(
132
+ run_loop.call_args.kwargs["working_dir"],
133
+ pathlib.Path.cwd().resolve(),
134
+ )
135
+
101
136
  def test_run_resolves_until_prefix(self):
102
137
  persistence.save_tasks(
103
138
  self.test_tasks_file,
@@ -154,7 +154,7 @@ def _write_json_report(
154
154
  "--time-limit",
155
155
  default=10,
156
156
  show_default=True,
157
- help="Per-trial hook time limit in minutes.",
157
+ help="Per-trial hook time limit in minutes (capped at 15).",
158
158
  )
159
159
  @click.option("--image", default=container.DEFAULT_IMAGE, show_default=True)
160
160
  @click.option("--docker", default="docker", show_default=True)
@@ -2,7 +2,9 @@
2
2
 
3
3
  import enum
4
4
  import functools
5
+ import os
5
6
  import shutil
7
+ import sys
6
8
  import time
7
9
 
8
10
  import pydantic
@@ -11,6 +13,20 @@ import pydantic
11
13
  KNOWN_RUNNERS = ("agy", "opencode", "claude", "codex")
12
14
 
13
15
 
16
+ def runner_path() -> str:
17
+ """Returns PATH with lemming's own directory and ~/.local/bin appended.
18
+
19
+ Agent subshells often inherit a minimal PATH that omits where uv installs
20
+ lemming and the runner CLIs. Directories already present keep their order.
21
+ """
22
+ dirs = os.get_exec_path()
23
+ lemming_dir = os.path.dirname(sys.executable)
24
+ for extra in (lemming_dir, os.path.expanduser("~/.local/bin")):
25
+ if os.path.isdir(extra) and extra not in dirs:
26
+ dirs.append(extra)
27
+ return os.pathsep.join(dirs)
28
+
29
+
14
30
  @functools.cache
15
31
  def detect_default_runner() -> str:
16
32
  """Returns the first known runner CLI found on PATH, falling back to "agy".
@@ -18,8 +34,9 @@ def detect_default_runner() -> str:
18
34
  Only used when no runner is persisted in the tasks file; an explicit
19
35
  (user-set) runner always takes precedence and remains sticky.
20
36
  """
37
+ path = runner_path()
21
38
  for name in KNOWN_RUNNERS:
22
- if shutil.which(name):
39
+ if shutil.which(name, path=path):
23
40
  return name
24
41
  return KNOWN_RUNNERS[0]
25
42
 
@@ -1,3 +1,5 @@
1
+ import sys
2
+
1
3
  import pydantic
2
4
  import pytest
3
5
 
@@ -57,7 +59,7 @@ def test_detect_default_runner_picks_first_installed(monkeypatch):
57
59
  monkeypatch.setattr(
58
60
  models.shutil,
59
61
  "which",
60
- lambda name: "/bin/x" if name == "claude" else None,
62
+ lambda name, path=None: "/bin/x" if name == "claude" else None,
61
63
  )
62
64
  assert models.detect_default_runner() == "claude"
63
65
  models.detect_default_runner.cache_clear()
@@ -65,24 +67,43 @@ def test_detect_default_runner_picks_first_installed(monkeypatch):
65
67
 
66
68
  def test_detect_default_runner_falls_back_to_agy(monkeypatch):
67
69
  models.detect_default_runner.cache_clear()
68
- monkeypatch.setattr(models.shutil, "which", lambda name: None)
70
+ monkeypatch.setattr(models.shutil, "which", lambda name, path=None: None)
69
71
  assert models.detect_default_runner() == "agy"
70
72
  models.detect_default_runner.cache_clear()
71
73
 
72
74
 
73
75
  def test_detect_default_runner_prefers_agy(monkeypatch):
74
76
  models.detect_default_runner.cache_clear()
75
- monkeypatch.setattr(models.shutil, "which", lambda name: f"/bin/{name}")
77
+ monkeypatch.setattr(
78
+ models.shutil, "which", lambda name, path=None: f"/bin/{name}"
79
+ )
76
80
  assert models.detect_default_runner() == "agy"
77
81
  models.detect_default_runner.cache_clear()
78
82
 
79
83
 
84
+ def test_detect_default_runner_searches_local_bin(tmp_path, monkeypatch):
85
+ # Agent subshells often inherit a minimal PATH without ~/.local/bin.
86
+ local_bin = tmp_path / ".local" / "bin"
87
+ local_bin.mkdir(parents=True)
88
+ fake_runner = local_bin / "codex"
89
+ fake_runner.write_text("#!/bin/sh\n")
90
+ fake_runner.chmod(0o755)
91
+ empty_dir = tmp_path / "empty"
92
+ empty_dir.mkdir()
93
+ monkeypatch.setenv("HOME", str(tmp_path))
94
+ monkeypatch.setenv("PATH", str(empty_dir))
95
+ monkeypatch.setattr(sys, "executable", str(empty_dir / "python"))
96
+ models.detect_default_runner.cache_clear()
97
+ assert models.detect_default_runner() == "codex"
98
+ models.detect_default_runner.cache_clear()
99
+
100
+
80
101
  def test_roadmap_config_uses_detected_runner(monkeypatch):
81
102
  models.detect_default_runner.cache_clear()
82
103
  monkeypatch.setattr(
83
104
  models.shutil,
84
105
  "which",
85
- lambda name: "/bin/x" if name == "codex" else None,
106
+ lambda name, path=None: "/bin/x" if name == "codex" else None,
86
107
  )
87
108
  assert models.RoadmapConfig().runner == "codex"
88
109
  # An explicit value always wins over detection.
@@ -12,6 +12,9 @@ from . import models, persistence, prompts, runner, shutdown
12
12
  from .hooks import FAILURE_HOOK_PRIORITY, get_hook_priority, select_hooks
13
13
  from .tasks import lifecycle, limits, operations, progress, queries
14
14
 
15
+ # Minutes a single hook may run, so a hung hook cannot burn a task's budget.
16
+ HOOK_TIME_LIMIT = 15
17
+
15
18
 
16
19
  def _read_rejection(tasks_file: pathlib.Path, task_id: str) -> str | None:
17
20
  """Returns the task's current rejection, if it still exists.
@@ -59,7 +62,8 @@ def run_hooks(
59
62
  them on success.
60
63
  working_dir: Working directory for the hook runner processes.
61
64
  final_status: If provided, mark the task with this status after hooks.
62
- time_limit: Time limit in minutes for each hook run (0 disables it).
65
+ time_limit: Task time limit in minutes; each hook run gets at most
66
+ HOOK_TIME_LIMIT of it (0 disables it).
63
67
  model_name: Model to request from the hook runner, if any.
64
68
  scope: What the hooks should look at. Defaults to the work the
65
69
  finished task left behind.
@@ -101,6 +105,7 @@ def run_hooks(
101
105
  )
102
106
  return exit_codes
103
107
 
108
+ hook_limit = min(time_limit, HOOK_TIME_LIMIT) if time_limit else 0
104
109
  for hook_index, hook_name in enumerate(active_hooks):
105
110
  # Reload tasks every time to ensure each hook sees progress from
106
111
  # previous hooks
@@ -142,7 +147,7 @@ def run_hooks(
142
147
  runner_args,
143
148
  no_defaults,
144
149
  verbose=verbose,
145
- time_limit=time_limit,
150
+ time_limit=hook_limit,
146
151
  working_dir=working_dir,
147
152
  model=model_name,
148
153
  )
@@ -157,7 +162,7 @@ def run_hooks(
157
162
  echo_fn=lambda line: click.echo(line, nl=False),
158
163
  header=f"Hook: {hook_name}",
159
164
  cwd=working_dir,
160
- time_limit=time_limit,
165
+ time_limit=hook_limit,
161
166
  )
162
167
  exit_codes[hook_name] = returncode
163
168
  if returncode != 0:
@@ -581,6 +586,20 @@ def _check_milestone(data: models.Roadmap, until: str) -> bool | None:
581
586
  return None
582
587
 
583
588
 
589
+ def _echo_runner_not_found(runner_name: str) -> None:
590
+ """Prints remediation for a runner command that could not be found."""
591
+ click.echo(
592
+ f"\nNOTE: Command '{runner_name}' not found.\n"
593
+ "If you are using a shell alias, "
594
+ "Python subprocesses cannot see it.\n"
595
+ "Fixes:\n"
596
+ "1. Use the absolute path: `lemming config set "
597
+ f"runner /path/to/{runner_name}`\n"
598
+ "2. Create an executable wrapper script for "
599
+ f"'{runner_name}' in your PATH."
600
+ )
601
+
602
+
584
603
  def run_loop(
585
604
  tasks_file: pathlib.Path,
586
605
  verbose: bool,
@@ -861,16 +880,7 @@ def run_loop(
861
880
  f"with exit code {returncode}"
862
881
  )
863
882
  if returncode == 127:
864
- click.echo(
865
- f"\nNOTE: Command '{selected_runner}' not found.\n"
866
- "If you are using a shell alias, "
867
- "Python subprocesses cannot see it.\n"
868
- "Fixes:\n"
869
- "1. Use the absolute path: `lemming config set "
870
- f"runner /path/to/{selected_runner}`\n"
871
- "2. Create an executable wrapper script for "
872
- f"'{selected_runner}' in your PATH."
873
- )
883
+ _echo_runner_not_found(selected_runner)
874
884
  except persistence.CorruptedTasksError:
875
885
  # Retrying cannot help an unreadable roadmap, and counting the
876
886
  # attempt would spend the task's retries on the wrong failure.
@@ -884,6 +894,9 @@ def run_loop(
884
894
  click.echo(
885
895
  f"\nAn error occurred while executing {selected_runner}: {e}"
886
896
  )
897
+ # Popen raises this, not exit code 127, for a missing executable.
898
+ if isinstance(e, FileNotFoundError) and e.filename == cmd[0]:
899
+ _echo_runner_not_found(selected_runner)
887
900
 
888
901
  should_abort = _handle_runner_exit(
889
902
  tasks_file=tasks_file,
@@ -6,6 +6,7 @@ import pytest
6
6
 
7
7
  from lemming import models, persistence
8
8
  from lemming.orchestrator import (
9
+ HOOK_TIME_LIMIT,
9
10
  _handle_runner_exit,
10
11
  _process_exhausted_retries,
11
12
  _process_finalizing_task,
@@ -265,6 +266,27 @@ def test_run_loop_treats_a_runner_that_never_started_as_a_failure(
265
266
  assert data.tasks[0].status == models.TaskStatus.PENDING
266
267
 
267
268
 
269
+ @mock.patch("time.sleep", return_value=None)
270
+ def test_run_loop_hints_when_runner_is_not_found(mock_sleep, setup_env, capsys):
271
+ test_tasks_file, _ = setup_env
272
+ data = persistence.load_tasks(test_tasks_file)
273
+ data.config.runner = "lemming-no-such-runner"
274
+ persistence.save_tasks(test_tasks_file, data)
275
+
276
+ run_loop(
277
+ test_tasks_file,
278
+ verbose=False,
279
+ retry_delay=0,
280
+ yolo=True,
281
+ no_defaults=False,
282
+ runner_args=(),
283
+ )
284
+
285
+ assert "Command 'lemming-no-such-runner' not found" in (
286
+ capsys.readouterr().out
287
+ )
288
+
289
+
268
290
  @mock.patch("lemming.runner.run_with_heartbeat")
269
291
  @mock.patch("time.sleep", return_value=None)
270
292
  def test_run_loop_cancelled(mock_sleep, mock_run, setup_env):
@@ -981,6 +1003,33 @@ def test_run_hooks_reverts_to_pending_when_hook_killed(
981
1003
  assert any("hook" in p.lower() for p in task.progress)
982
1004
 
983
1005
 
1006
+ @mock.patch("lemming.prompts.prepare_hook_prompt")
1007
+ @mock.patch("lemming.runner.run_with_heartbeat")
1008
+ def test_run_hooks_caps_time_limit(mock_run, mock_prepare, hooks_env):
1009
+ """A hook gets at most HOOK_TIME_LIMIT, not the task's whole budget."""
1010
+ mock_prepare.return_value = "Mock Prompt"
1011
+ mock_run.return_value = (0, "", "")
1012
+
1013
+ for time_limit, expected in [
1014
+ (60, HOOK_TIME_LIMIT),
1015
+ (0, 0),
1016
+ (5, 5),
1017
+ ]:
1018
+ run_hooks(
1019
+ hooks_env,
1020
+ "12345678",
1021
+ "agy",
1022
+ yolo=True,
1023
+ runner_args=(),
1024
+ no_defaults=False,
1025
+ verbose=False,
1026
+ hooks=["roadmap"],
1027
+ time_limit=time_limit,
1028
+ )
1029
+ _, kwargs = mock_run.call_args
1030
+ assert kwargs["time_limit"] == expected
1031
+
1032
+
984
1033
  @mock.patch("lemming.prompts.prepare_hook_prompt")
985
1034
  @mock.patch("lemming.runner.run_with_heartbeat")
986
1035
  def test_run_hooks_reverts_to_pending_when_a_hook_rejects(
@@ -39,7 +39,8 @@ class _RoadmapContextPolicy:
39
39
  _RUNNER_ROADMAP_POLICY = _RoadmapContextPolicy(
40
40
  total_chars=64_000,
41
41
  goal_chars=8_000,
42
- active_description_chars=1_000,
42
+ # Every agent turn resends this; upcoming tasks only need to be recognized
43
+ active_description_chars=300,
43
44
  terminal_description_chars=200,
44
45
  progress_entries=3,
45
46
  progress_entry_chars=1_000,
@@ -247,6 +247,24 @@ def test_format_roadmap_has_global_budget_and_prioritizes_active_tasks():
247
247
  assert "current task; details below" in roadmap
248
248
 
249
249
 
250
+ def test_runner_roadmap_summarizes_upcoming_tasks():
251
+ data = models.Roadmap(
252
+ tasks=[
253
+ models.Task(id=str(index), description=f"task {index} " + "d" * 700)
254
+ for index in range(50)
255
+ ],
256
+ )
257
+
258
+ roadmap = prompts._format_roadmap(
259
+ data,
260
+ current_task_id="0",
261
+ policy=prompts._RUNNER_ROADMAP_POLICY,
262
+ )
263
+
264
+ assert "task 49" in roadmap
265
+ assert len(roadmap) < 20_000
266
+
267
+
250
268
  def test_review_hook_roadmap_uses_smaller_context_budget():
251
269
  data = models.Roadmap(
252
270
  goal="g" * 10_000,
@@ -405,7 +405,8 @@ def extract_lost_writes(output: str) -> list[str]:
405
405
  Agy since 1.1.12 rejects a `write_to_file` carrying ArtifactMetadata for
406
406
  a workspace path. The model usually retries without it, but sometimes
407
407
  writes the file into agy's own artifact directory instead and still
408
- reports success (google-antigravity/antigravity-cli#838).
408
+ reports success (google-antigravity/antigravity-cli#838). Agy 1.4 streams
409
+ the tool as `write_file` with a `Path` rather than a `TargetFile`.
409
410
 
410
411
  Args:
411
412
  output: Captured runner output, one JSON event per line.
@@ -416,7 +417,7 @@ def extract_lost_writes(output: str) -> list[str]:
416
417
  lost: dict[str, None] = {}
417
418
  for raw_line in output.splitlines():
418
419
  line = raw_line.strip()
419
- if not line.startswith("{") or "write_to_file" not in line:
420
+ if not line.startswith("{") or '"write_' not in line:
420
421
  continue
421
422
  try:
422
423
  event = json.loads(line)
@@ -427,13 +428,15 @@ def extract_lost_writes(output: str) -> list[str]:
427
428
  update = event.get("step_update") if isinstance(event, dict) else None
428
429
  if not isinstance(update, dict):
429
430
  continue
430
- if update.get("tool_name") != "write_to_file":
431
+ if update.get("tool_name") not in ("write_to_file", "write_file"):
431
432
  continue
432
433
  info = update.get("tool_info")
433
434
  if not isinstance(info, dict):
434
435
  continue
435
436
  params = info.get("parameters")
436
- target = params.get("TargetFile") if isinstance(params, dict) else None
437
+ if not isinstance(params, dict):
438
+ continue
439
+ target = params.get("TargetFile") or params.get("Path")
437
440
  if not isinstance(target, str):
438
441
  continue
439
442
 
@@ -597,6 +600,7 @@ def _runner_environment(
597
600
  env = os.environ.copy()
598
601
  env["LEMMING_PARENT_TASK_ID"] = task_id
599
602
  env["LEMMING_PARENT_TASKS_FILE"] = str(tasks_file.resolve())
603
+ env["PATH"] = models.runner_path()
600
604
 
601
605
  runner_base = os.path.basename(cmd[0]) if cmd else ""
602
606
  if runner_base.startswith("opencode"):