scaleapi-vero 0.5.0__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 (267) hide show
  1. scaleapi_vero-0.5.0/.gitignore +40 -0
  2. scaleapi_vero-0.5.0/PKG-INFO +219 -0
  3. scaleapi_vero-0.5.0/README.md +186 -0
  4. scaleapi_vero-0.5.0/docs/agent-setup-guide.md +133 -0
  5. scaleapi_vero-0.5.0/docs/guide.md +745 -0
  6. scaleapi_vero-0.5.0/docs/harbor-architecture.md +231 -0
  7. scaleapi_vero-0.5.0/examples/c-matmul/.gitignore +2 -0
  8. scaleapi_vero-0.5.0/examples/c-matmul/README.md +24 -0
  9. scaleapi_vero-0.5.0/examples/c-matmul/harness/benchmark.c +69 -0
  10. scaleapi_vero-0.5.0/examples/c-matmul/harness/evaluate.py +111 -0
  11. scaleapi_vero-0.5.0/examples/c-matmul/optimizer/optimize.py +18 -0
  12. scaleapi_vero-0.5.0/examples/c-matmul/optimizer/optimized.c +16 -0
  13. scaleapi_vero-0.5.0/examples/c-matmul/target/.gitignore +3 -0
  14. scaleapi_vero-0.5.0/examples/c-matmul/target/matmul.c +16 -0
  15. scaleapi_vero-0.5.0/examples/c-matmul/target/matmul.h +8 -0
  16. scaleapi_vero-0.5.0/examples/c-matmul/vero.toml +50 -0
  17. scaleapi_vero-0.5.0/examples/circle-packing/.gitignore +2 -0
  18. scaleapi_vero-0.5.0/examples/circle-packing/README.md +73 -0
  19. scaleapi_vero-0.5.0/examples/circle-packing/UPSTREAM_LICENSE +201 -0
  20. scaleapi_vero-0.5.0/examples/circle-packing/harness/evaluate.py +315 -0
  21. scaleapi_vero-0.5.0/examples/circle-packing/make_figure.py +203 -0
  22. scaleapi_vero-0.5.0/examples/circle-packing/target/.gitignore +5 -0
  23. scaleapi_vero-0.5.0/examples/circle-packing/target/packing.py +62 -0
  24. scaleapi_vero-0.5.0/examples/circle-packing/target/pyproject.toml +9 -0
  25. scaleapi_vero-0.5.0/examples/circle-packing/target/uv.lock +8 -0
  26. scaleapi_vero-0.5.0/examples/circle-packing/vero.toml +86 -0
  27. scaleapi_vero-0.5.0/examples/harbor-circle-packing/.gitignore +3 -0
  28. scaleapi_vero-0.5.0/examples/harbor-circle-packing/README.md +91 -0
  29. scaleapi_vero-0.5.0/examples/harbor-circle-packing/build.yaml +112 -0
  30. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/Dockerfile +20 -0
  31. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/agent-baseline/packing.py +62 -0
  32. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/agent-baseline/pyproject.toml +9 -0
  33. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/agent-seed/packing.py +62 -0
  34. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/agent-seed/pyproject.toml +9 -0
  35. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/docker-compose.yaml +44 -0
  36. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/main/seed.sh +14 -0
  37. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/sidecar/Dockerfile +32 -0
  38. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/sidecar/circle_factory.py +167 -0
  39. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/sidecar/harness/evaluate.py +315 -0
  40. scaleapi_vero-0.5.0/examples/harbor-circle-packing/environment/sidecar/serve.json +1 -0
  41. scaleapi_vero-0.5.0/examples/harbor-circle-packing/instruction.md +34 -0
  42. scaleapi_vero-0.5.0/examples/harbor-circle-packing/results/progress.svg +58 -0
  43. scaleapi_vero-0.5.0/examples/harbor-circle-packing/solution/solve.sh +6 -0
  44. scaleapi_vero-0.5.0/examples/harbor-circle-packing/task.toml +15 -0
  45. scaleapi_vero-0.5.0/examples/harbor-circle-packing/tests/test.sh +5 -0
  46. scaleapi_vero-0.5.0/examples/harness-conformance/README.md +109 -0
  47. scaleapi_vero-0.5.0/examples/harness-conformance/SKILL.md +188 -0
  48. scaleapi_vero-0.5.0/examples/harness-conformance/build.yaml +222 -0
  49. scaleapi_vero-0.5.0/examples/harness-conformance/partitions/development.json +4 -0
  50. scaleapi_vero-0.5.0/examples/harness-conformance/partitions/manifest.json +19 -0
  51. scaleapi_vero-0.5.0/examples/harness-conformance/partitions/test.json +4 -0
  52. scaleapi_vero-0.5.0/examples/harness-conformance/partitions/validation.json +4 -0
  53. scaleapi_vero-0.5.0/examples/harness-conformance/target/pyproject.toml +16 -0
  54. scaleapi_vero-0.5.0/examples/harness-conformance/target/src/conformance_agent/__init__.py +1 -0
  55. scaleapi_vero-0.5.0/examples/harness-conformance/target/src/conformance_agent/agent.py +95 -0
  56. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/environment/Dockerfile +6 -0
  57. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/instruction.md +3 -0
  58. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/solution/solve.sh +4 -0
  59. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/task.toml +29 -0
  60. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/tests/test.sh +10 -0
  61. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-01/tests/verify.py +22 -0
  62. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/environment/Dockerfile +6 -0
  63. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/instruction.md +3 -0
  64. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/solution/solve.sh +4 -0
  65. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/task.toml +29 -0
  66. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/tests/test.sh +10 -0
  67. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-02/tests/verify.py +22 -0
  68. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/environment/Dockerfile +6 -0
  69. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/instruction.md +3 -0
  70. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/solution/solve.sh +4 -0
  71. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/task.toml +29 -0
  72. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/tests/test.sh +10 -0
  73. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-03/tests/verify.py +22 -0
  74. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/environment/Dockerfile +6 -0
  75. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/instruction.md +3 -0
  76. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/solution/solve.sh +4 -0
  77. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/task.toml +29 -0
  78. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/tests/test.sh +10 -0
  79. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-04/tests/verify.py +22 -0
  80. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/environment/Dockerfile +6 -0
  81. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/instruction.md +3 -0
  82. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/solution/solve.sh +4 -0
  83. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/task.toml +29 -0
  84. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/tests/test.sh +10 -0
  85. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-05/tests/verify.py +22 -0
  86. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/environment/Dockerfile +6 -0
  87. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/instruction.md +3 -0
  88. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/solution/solve.sh +4 -0
  89. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/task.toml +29 -0
  90. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/tests/test.sh +10 -0
  91. scaleapi_vero-0.5.0/examples/harness-conformance/tasks/conformance-06/tests/verify.py +22 -0
  92. scaleapi_vero-0.5.0/pyproject.toml +81 -0
  93. scaleapi_vero-0.5.0/src/vero/__init__.py +34 -0
  94. scaleapi_vero-0.5.0/src/vero/agents/__init__.py +24 -0
  95. scaleapi_vero-0.5.0/src/vero/agents/claude_code.py +364 -0
  96. scaleapi_vero-0.5.0/src/vero/agents/events.py +46 -0
  97. scaleapi_vero-0.5.0/src/vero/agents/producer.py +166 -0
  98. scaleapi_vero-0.5.0/src/vero/agents/protocol.py +97 -0
  99. scaleapi_vero-0.5.0/src/vero/agents/vero.py +419 -0
  100. scaleapi_vero-0.5.0/src/vero/candidate.py +77 -0
  101. scaleapi_vero-0.5.0/src/vero/candidate_repository/__init__.py +10 -0
  102. scaleapi_vero-0.5.0/src/vero/candidate_repository/base.py +85 -0
  103. scaleapi_vero-0.5.0/src/vero/candidate_repository/git.py +862 -0
  104. scaleapi_vero-0.5.0/src/vero/cli.py +1028 -0
  105. scaleapi_vero-0.5.0/src/vero/config.py +545 -0
  106. scaleapi_vero-0.5.0/src/vero/evals_cli.py +743 -0
  107. scaleapi_vero-0.5.0/src/vero/evaluation/__init__.py +174 -0
  108. scaleapi_vero-0.5.0/src/vero/evaluation/backends/__init__.py +8 -0
  109. scaleapi_vero-0.5.0/src/vero/evaluation/backends/base.py +110 -0
  110. scaleapi_vero-0.5.0/src/vero/evaluation/backends/command.py +389 -0
  111. scaleapi_vero-0.5.0/src/vero/evaluation/backends/python_task.py +328 -0
  112. scaleapi_vero-0.5.0/src/vero/evaluation/engine.py +546 -0
  113. scaleapi_vero-0.5.0/src/vero/evaluation/evaluator.py +295 -0
  114. scaleapi_vero-0.5.0/src/vero/evaluation/exceptions.py +52 -0
  115. scaleapi_vero-0.5.0/src/vero/evaluation/models.py +823 -0
  116. scaleapi_vero-0.5.0/src/vero/evaluation/scoring/__init__.py +6 -0
  117. scaleapi_vero-0.5.0/src/vero/evaluation/scoring/error_taxonomy.py +274 -0
  118. scaleapi_vero-0.5.0/src/vero/evaluation/scoring/objective.py +190 -0
  119. scaleapi_vero-0.5.0/src/vero/evaluation/scoring/security.py +108 -0
  120. scaleapi_vero-0.5.0/src/vero/evaluation/store/__init__.py +6 -0
  121. scaleapi_vero-0.5.0/src/vero/evaluation/store/budget.py +241 -0
  122. scaleapi_vero-0.5.0/src/vero/evaluation/store/persistence.py +495 -0
  123. scaleapi_vero-0.5.0/src/vero/exceptions.py +5 -0
  124. scaleapi_vero-0.5.0/src/vero/gateway/__init__.py +12 -0
  125. scaleapi_vero-0.5.0/src/vero/gateway/inference.py +1202 -0
  126. scaleapi_vero-0.5.0/src/vero/harbor/__init__.py +45 -0
  127. scaleapi_vero-0.5.0/src/vero/harbor/backend.py +1784 -0
  128. scaleapi_vero-0.5.0/src/vero/harbor/build/__init__.py +33 -0
  129. scaleapi_vero-0.5.0/src/vero/harbor/build/compiler.py +871 -0
  130. scaleapi_vero-0.5.0/src/vero/harbor/build/config.py +746 -0
  131. scaleapi_vero-0.5.0/src/vero/harbor/build/loader.py +160 -0
  132. scaleapi_vero-0.5.0/src/vero/harbor/build/specs.py +355 -0
  133. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/Dockerfile.gateway.j2 +17 -0
  134. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/Dockerfile.main.j2 +22 -0
  135. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/Dockerfile.sidecar.j2 +53 -0
  136. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/docker-compose.yaml.j2 +108 -0
  137. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/instruction.md.j2 +132 -0
  138. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/seed.sh.j2 +41 -0
  139. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/solve.sh.j2 +17 -0
  140. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/task.toml.j2 +45 -0
  141. scaleapi_vero-0.5.0/src/vero/harbor/build/templates/test.sh.j2 +10 -0
  142. scaleapi_vero-0.5.0/src/vero/harbor/cli.py +1289 -0
  143. scaleapi_vero-0.5.0/src/vero/harbor/deployment.py +477 -0
  144. scaleapi_vero-0.5.0/src/vero/harbor/generation.py +58 -0
  145. scaleapi_vero-0.5.0/src/vero/interpret/__init__.py +26 -0
  146. scaleapi_vero-0.5.0/src/vero/interpret/analysis/__init__.py +5 -0
  147. scaleapi_vero-0.5.0/src/vero/interpret/analysis/brand/fonts/GeistMono.ttf +0 -0
  148. scaleapi_vero-0.5.0/src/vero/interpret/analysis/brand/fonts/HostGrotesk.ttf +0 -0
  149. scaleapi_vero-0.5.0/src/vero/interpret/analysis/brand/house_style.py +137 -0
  150. scaleapi_vero-0.5.0/src/vero/interpret/analysis/display.py +88 -0
  151. scaleapi_vero-0.5.0/src/vero/interpret/analysis/figures.py +365 -0
  152. scaleapi_vero-0.5.0/src/vero/interpret/analysis/paper_figures.py +258 -0
  153. scaleapi_vero-0.5.0/src/vero/interpret/analysis/preamble.py +196 -0
  154. scaleapi_vero-0.5.0/src/vero/interpret/analysis/stats.py +236 -0
  155. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/__init__.py +5 -0
  156. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/base.py +53 -0
  157. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/harbor/__init__.py +5 -0
  158. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/harbor/adapter.py +168 -0
  159. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/harbor/repo.py +90 -0
  160. scaleapi_vero-0.5.0/src/vero/interpret/artifacts/harbor/session.py +99 -0
  161. scaleapi_vero-0.5.0/src/vero/interpret/cache.py +94 -0
  162. scaleapi_vero-0.5.0/src/vero/interpret/cli.py +244 -0
  163. scaleapi_vero-0.5.0/src/vero/interpret/config.py +76 -0
  164. scaleapi_vero-0.5.0/src/vero/interpret/edits/__init__.py +5 -0
  165. scaleapi_vero-0.5.0/src/vero/interpret/edits/decompose.py +202 -0
  166. scaleapi_vero-0.5.0/src/vero/interpret/edits/locus.py +172 -0
  167. scaleapi_vero-0.5.0/src/vero/interpret/edits/provenance.py +62 -0
  168. scaleapi_vero-0.5.0/src/vero/interpret/labeling/__init__.py +0 -0
  169. scaleapi_vero-0.5.0/src/vero/interpret/labeling/client.py +85 -0
  170. scaleapi_vero-0.5.0/src/vero/interpret/labeling/labeler.py +203 -0
  171. scaleapi_vero-0.5.0/src/vero/interpret/labeling/taxonomy.py +182 -0
  172. scaleapi_vero-0.5.0/src/vero/interpret/models.py +190 -0
  173. scaleapi_vero-0.5.0/src/vero/layout.py +174 -0
  174. scaleapi_vero-0.5.0/src/vero/models.py +16 -0
  175. scaleapi_vero-0.5.0/src/vero/optimization/__init__.py +49 -0
  176. scaleapi_vero-0.5.0/src/vero/optimization/command.py +179 -0
  177. scaleapi_vero-0.5.0/src/vero/optimization/models.py +130 -0
  178. scaleapi_vero-0.5.0/src/vero/optimization/optimizer.py +739 -0
  179. scaleapi_vero-0.5.0/src/vero/optimization/protocols.py +90 -0
  180. scaleapi_vero-0.5.0/src/vero/optimization/strategy.py +329 -0
  181. scaleapi_vero-0.5.0/src/vero/report.py +529 -0
  182. scaleapi_vero-0.5.0/src/vero/runtime/__init__.py +59 -0
  183. scaleapi_vero-0.5.0/src/vero/runtime/artifacts.py +42 -0
  184. scaleapi_vero-0.5.0/src/vero/runtime/context.py +604 -0
  185. scaleapi_vero-0.5.0/src/vero/runtime/events.py +120 -0
  186. scaleapi_vero-0.5.0/src/vero/runtime/factory.py +282 -0
  187. scaleapi_vero-0.5.0/src/vero/runtime/session.py +522 -0
  188. scaleapi_vero-0.5.0/src/vero/runtime/wandb.py +551 -0
  189. scaleapi_vero-0.5.0/src/vero/sandbox.py +742 -0
  190. scaleapi_vero-0.5.0/src/vero/sidecar/__init__.py +72 -0
  191. scaleapi_vero-0.5.0/src/vero/sidecar/app.py +230 -0
  192. scaleapi_vero-0.5.0/src/vero/sidecar/auth.py +79 -0
  193. scaleapi_vero-0.5.0/src/vero/sidecar/isolation.py +43 -0
  194. scaleapi_vero-0.5.0/src/vero/sidecar/serve.py +104 -0
  195. scaleapi_vero-0.5.0/src/vero/sidecar/session.py +235 -0
  196. scaleapi_vero-0.5.0/src/vero/sidecar/sidecar.py +850 -0
  197. scaleapi_vero-0.5.0/src/vero/sidecar/transport.py +190 -0
  198. scaleapi_vero-0.5.0/src/vero/sidecar/verifier.py +601 -0
  199. scaleapi_vero-0.5.0/src/vero/skills/evals/SKILL.md +120 -0
  200. scaleapi_vero-0.5.0/src/vero/staging.py +72 -0
  201. scaleapi_vero-0.5.0/src/vero/templates/report.html +151 -0
  202. scaleapi_vero-0.5.0/src/vero/tools/__init__.py +35 -0
  203. scaleapi_vero-0.5.0/src/vero/tools/base.py +20 -0
  204. scaleapi_vero-0.5.0/src/vero/tools/evaluation.py +95 -0
  205. scaleapi_vero-0.5.0/src/vero/tools/planning.py +96 -0
  206. scaleapi_vero-0.5.0/src/vero/tools/registry.py +89 -0
  207. scaleapi_vero-0.5.0/src/vero/tools/sandbox_tools.py +79 -0
  208. scaleapi_vero-0.5.0/src/vero/tools/sub_agent.py +182 -0
  209. scaleapi_vero-0.5.0/src/vero/tools/utils/__init__.py +32 -0
  210. scaleapi_vero-0.5.0/src/vero/tools/utils/openai_agents.py +80 -0
  211. scaleapi_vero-0.5.0/src/vero/tools/web.py +304 -0
  212. scaleapi_vero-0.5.0/src/vero/utils/__init__.py +27 -0
  213. scaleapi_vero-0.5.0/src/vero/utils/asyncio.py +254 -0
  214. scaleapi_vero-0.5.0/src/vero/utils/general.py +104 -0
  215. scaleapi_vero-0.5.0/src/vero/utils/openai_agents.py +54 -0
  216. scaleapi_vero-0.5.0/src/vero/workspace/__init__.py +6 -0
  217. scaleapi_vero-0.5.0/src/vero/workspace/base.py +141 -0
  218. scaleapi_vero-0.5.0/src/vero/workspace/git.py +408 -0
  219. scaleapi_vero-0.5.0/tests/__init__.py +0 -0
  220. scaleapi_vero-0.5.0/tests/test_interpret_decompose.py +183 -0
  221. scaleapi_vero-0.5.0/tests/test_interpret_locus.py +89 -0
  222. scaleapi_vero-0.5.0/tests/test_lockfile.py +33 -0
  223. scaleapi_vero-0.5.0/tests/test_remote_sandbox.py +182 -0
  224. scaleapi_vero-0.5.0/tests/test_sandbox.py +363 -0
  225. scaleapi_vero-0.5.0/tests/test_subprocess.py +108 -0
  226. scaleapi_vero-0.5.0/tests/test_tools.py +64 -0
  227. scaleapi_vero-0.5.0/tests/test_uv_with_editable.py +117 -0
  228. scaleapi_vero-0.5.0/tests/test_v05_agent_context.py +300 -0
  229. scaleapi_vero-0.5.0/tests/test_v05_agent_events.py +52 -0
  230. scaleapi_vero-0.5.0/tests/test_v05_agent_producer.py +350 -0
  231. scaleapi_vero-0.5.0/tests/test_v05_benchmark_configs.py +283 -0
  232. scaleapi_vero-0.5.0/tests/test_v05_c_example.py +90 -0
  233. scaleapi_vero-0.5.0/tests/test_v05_candidate_repository.py +298 -0
  234. scaleapi_vero-0.5.0/tests/test_v05_circle_packing_example.py +180 -0
  235. scaleapi_vero-0.5.0/tests/test_v05_claude_agent.py +120 -0
  236. scaleapi_vero-0.5.0/tests/test_v05_cli.py +881 -0
  237. scaleapi_vero-0.5.0/tests/test_v05_command_backend.py +331 -0
  238. scaleapi_vero-0.5.0/tests/test_v05_config.py +148 -0
  239. scaleapi_vero-0.5.0/tests/test_v05_darwin_godel_strategy.py +120 -0
  240. scaleapi_vero-0.5.0/tests/test_v05_docker_sandbox.py +210 -0
  241. scaleapi_vero-0.5.0/tests/test_v05_error_taxonomy.py +266 -0
  242. scaleapi_vero-0.5.0/tests/test_v05_evals_cli.py +364 -0
  243. scaleapi_vero-0.5.0/tests/test_v05_evaluation_models.py +338 -0
  244. scaleapi_vero-0.5.0/tests/test_v05_evaluation_objective.py +223 -0
  245. scaleapi_vero-0.5.0/tests/test_v05_evaluation_runtime.py +1369 -0
  246. scaleapi_vero-0.5.0/tests/test_v05_evaluation_tools.py +105 -0
  247. scaleapi_vero-0.5.0/tests/test_v05_evolutionary_strategy.py +119 -0
  248. scaleapi_vero-0.5.0/tests/test_v05_harbor_backend.py +1360 -0
  249. scaleapi_vero-0.5.0/tests/test_v05_harbor_build.py +1629 -0
  250. scaleapi_vero-0.5.0/tests/test_v05_harbor_deployment.py +345 -0
  251. scaleapi_vero-0.5.0/tests/test_v05_harbor_http.py +670 -0
  252. scaleapi_vero-0.5.0/tests/test_v05_harbor_inference.py +1188 -0
  253. scaleapi_vero-0.5.0/tests/test_v05_harbor_isolation_container.py +158 -0
  254. scaleapi_vero-0.5.0/tests/test_v05_harbor_session.py +180 -0
  255. scaleapi_vero-0.5.0/tests/test_v05_harbor_sidecar.py +897 -0
  256. scaleapi_vero-0.5.0/tests/test_v05_harbor_verifier.py +681 -0
  257. scaleapi_vero-0.5.0/tests/test_v05_optimizer.py +535 -0
  258. scaleapi_vero-0.5.0/tests/test_v05_python_example.py +40 -0
  259. scaleapi_vero-0.5.0/tests/test_v05_python_task_backend.py +323 -0
  260. scaleapi_vero-0.5.0/tests/test_v05_report.py +228 -0
  261. scaleapi_vero-0.5.0/tests/test_v05_runtime_factory.py +510 -0
  262. scaleapi_vero-0.5.0/tests/test_v05_runtime_session.py +300 -0
  263. scaleapi_vero-0.5.0/tests/test_v05_vero_agent.py +146 -0
  264. scaleapi_vero-0.5.0/tests/test_v05_wandb.py +563 -0
  265. scaleapi_vero-0.5.0/tests/test_web.py +156 -0
  266. scaleapi_vero-0.5.0/tests/test_workspace.py +391 -0
  267. scaleapi_vero-0.5.0/uv.lock +2359 -0
@@ -0,0 +1,40 @@
1
+ # Environment
2
+ .env
3
+ .env.*
4
+ .venv/
5
+ venv/
6
+
7
+ # Python
8
+ __pycache__/
9
+ *.pyc
10
+ *.pyo
11
+ *.egg-info/
12
+ dist/
13
+ build/
14
+ !src/vero/harbor/build/
15
+ !src/vero/harbor/build/*.py
16
+ !src/vero/harbor/build/templates/
17
+ !src/vero/harbor/build/templates/*
18
+
19
+ #harbor
20
+ jobs/
21
+
22
+ # Testing
23
+ .pytest_cache/
24
+ .mypy_cache/
25
+ .ruff_cache/
26
+ htmlcov/
27
+ .coverage
28
+
29
+ # IDE
30
+ .idea/
31
+ .vscode/
32
+ *.swp
33
+ *.swo
34
+
35
+ # Jupyter
36
+ **/.ipynb_checkpoints
37
+
38
+ # OS
39
+ .DS_Store
40
+ Thumbs.db
@@ -0,0 +1,219 @@
1
+ Metadata-Version: 2.5
2
+ Name: scaleapi-vero
3
+ Version: 0.5.0
4
+ Summary: A harness for agents to optimize programs.
5
+ Author-email: Varun Ursekar <oss@scale.com>
6
+ License: MIT
7
+ Requires-Python: <3.14,>=3.11
8
+ Requires-Dist: click>=8.0.0
9
+ Requires-Dist: pydantic>=2.11.7
10
+ Requires-Dist: wcmatch>=10.1
11
+ Provides-Extra: claude
12
+ Requires-Dist: claude-agent-sdk>=0.1.56; extra == 'claude'
13
+ Provides-Extra: harbor
14
+ Requires-Dist: fastapi>=0.110; extra == 'harbor'
15
+ Requires-Dist: httpx>=0.28.1; extra == 'harbor'
16
+ Requires-Dist: jinja2>=3.1.6; extra == 'harbor'
17
+ Requires-Dist: pyyaml>=6.0.2; extra == 'harbor'
18
+ Requires-Dist: uvicorn>=0.27; extra == 'harbor'
19
+ Provides-Extra: interpret
20
+ Requires-Dist: openai>=1.0; extra == 'interpret'
21
+ Provides-Extra: optimize
22
+ Requires-Dist: async-lru>=2.0.5; extra == 'optimize'
23
+ Requires-Dist: beautifulsoup4>=4.14.2; extra == 'optimize'
24
+ Requires-Dist: httpx>=0.28.1; extra == 'optimize'
25
+ Requires-Dist: lxml>=6.0.2; extra == 'optimize'
26
+ Requires-Dist: openai-agents[litellm]<0.19,>=0.18.3; extra == 'optimize'
27
+ Requires-Dist: orjson>=3.10; extra == 'optimize'
28
+ Requires-Dist: pypdf>=6.2.0; extra == 'optimize'
29
+ Requires-Dist: trafilatura>=2.0.0; extra == 'optimize'
30
+ Provides-Extra: wandb
31
+ Requires-Dist: wandb>=0.19.10; extra == 'wandb'
32
+ Description-Content-Type: text/markdown
33
+
34
+ # VeRO: a harness for agents to optimize programs, text, and agents
35
+
36
+ [![Paper](https://img.shields.io/badge/arXiv-2602.22480-b31b1b.svg)](https://arxiv.org/abs/2602.22480)
37
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../LICENSE)
38
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
39
+
40
+ VeRO gives an optimizer something to edit, a controlled way to evaluate it, and
41
+ durable memory of everything it tried. The target is anything you can put under
42
+ Git and score — a **program** (one function to a whole repo), **text** (a prompt,
43
+ spec, or config), or an **agent** (its scaffold, tools, and prompts).
44
+
45
+ VeRO runs the same **version → evaluate → select** loop over all of them. *Where*
46
+ each candidate is produced and contained is a swappable backend, and **Harbor is
47
+ the recommended one**: it runs the whole coding agent inside a reproducible,
48
+ credential-isolated container and scores it against a trusted evaluation sidecar.
49
+ That is the right default for optimizing agents and for any untrusted or
50
+ reproducibility-critical run. Lighter local backends exist for trusted work that
51
+ does not need containment.
52
+
53
+ ```
54
+ ┌─────────────────────────┐ submit candidate ┌─────────────────────────┐
55
+ │ candidate production ├──────────────────────►│ evaluation service │
56
+ │ │ │ │
57
+ │ coding agent, command, │◄──────────────────────┤ owns cases + scoring │
58
+ │ or custom strategy; │ score + diagnostics │ │
59
+ │ edits its own Git │ │ development: may ask │
60
+ │ worktree per candidate │ │ validation: aggregate │
61
+ └───────────┬─────────────┘ │ test: withheld │
62
+ │ commit └───────────┬─────────────┘
63
+ ▼ │ report
64
+ ┌─────────────────────────┐ next round ┌───────────────▼─────────────┐
65
+ │ candidate history: │◄──────────────────┤ selection: keep the best │
66
+ │ every version kept, │ │ feasible candidate │
67
+ │ each one re-selectable │ └─────────────────────────────┘
68
+ └─────────────────────────┘
69
+
70
+ Every model call on both sides goes through the inference gateway, which holds
71
+ the provider key and meters spend in tokens against a per-scope budget.
72
+ ```
73
+
74
+ ## Install
75
+
76
+ ```bash
77
+ uv sync --extra optimize # or --all-extras for the full toolchain
78
+ uv run vero --help
79
+ ```
80
+
81
+ > The published distribution is **`scaleapi-vero`** (`pip install scaleapi-vero`);
82
+ > it imports as `vero`. Do **not** install `scale-vero` from PyPI — that name is
83
+ > an unrelated placeholder squatted in July 2026, not VeRO.
84
+
85
+ Python 3.11–3.13. 3.14 is excluded because litellm does not build there.
86
+
87
+ ## Quickstart — no credentials needed
88
+
89
+ The C matrix-multiplication example is deterministic and runs with **no model
90
+ credentials at all**. Its editable target contains only C; a trusted external
91
+ harness compiles it, checks correctness, and measures latency.
92
+
93
+ ```bash
94
+ cd examples/c-matmul/target
95
+ git init -b main && git add .
96
+ git -c user.name=vero -c user.email=vero@localhost commit -m baseline
97
+ cd ..
98
+
99
+ uv run vero evaluate --config vero.toml # score the baseline
100
+ uv run vero run --config vero.toml # optimize
101
+ ```
102
+
103
+ VeRO evaluates the baseline, gives an isolated worktree to the configured
104
+ producer, evaluates its commit, selects the faster feasible result, and leaves
105
+ the original target untouched.
106
+
107
+ ## Examples
108
+
109
+ Each is a complete, checked-in target plus harness — clone-and-run, not a sketch.
110
+
111
+ | Example | Optimizes | Needs |
112
+ | --- | --- | --- |
113
+ | [`c-matmul`](examples/c-matmul/) | a C matmul kernel, for latency under a correctness constraint | **nothing** — deterministic, no credentials |
114
+ | [`circle-packing`](examples/circle-packing/) | a packing algorithm: 26 circles in a unit square, maximizing the sum of radii | a model, via `LITELLM_BASE_URL`/`LITELLM_API_KEY` or `OPENAI_BASE_URL`/`OPENAI_API_KEY` |
115
+ | [`harbor-circle-packing`](examples/harbor-circle-packing/) | the same target, but with the agent contained and scored by a sidecar | Docker + credentials |
116
+ | [`harness-conformance`](examples/harness-conformance/) | nothing — it checks the *stack*: whether a new agent or model can actually drive a run | credentials for the pair under test |
117
+
118
+ Run `harness-conformance` before spending a real benchmark on a new harness or
119
+ model. Every harness addresses its provider differently, and it costs minutes to
120
+ find that out instead of hours.
121
+
122
+ ### A real run, end to end
123
+
124
+ `harbor-circle-packing` runs a coding agent in a container, scores each candidate
125
+ through a trusted sidecar, and finalizes on a `test` partition the agent never
126
+ touches. One run with `mini-swe-agent` and `claude-sonnet-5`:
127
+
128
+ ![circle-packing search progress](examples/harbor-circle-packing/results/progress.svg)
129
+
130
+ **0.9598 → 2.5766 on the held-out partition**, `shipped: true`, in about an hour.
131
+ The best published result for 26 circles is ~2.635. The agent wrote a 15 KB
132
+ Lubachevsky–Stillinger-style growth algorithm with LP refinement — no hardcoded
133
+ coordinates.
134
+
135
+ Two details worth reading off the left panel. The red point is an **infeasible**
136
+ candidate: it scored 2.5341 but overlapped, the harness rejected it on the
137
+ `valid == 1` constraint, and the agent's next commit was "Add safety margin to
138
+ guarantee strict feasibility". And the last five evaluations are flat — it found
139
+ the idea early, then polished.
140
+
141
+ **The cautionary half.** The same task run with `codex` and no prohibition on
142
+ hardcoding scored **2.6360 in eight minutes** — higher than the honest run — by
143
+ copying the published Packomania table into 26 coordinate literals. It satisfies
144
+ the objective exactly and held-out scoring cannot catch it, because every
145
+ partition here holds one deterministic case, so a memorized answer transfers
146
+ perfectly. The instruction now forbids it. The general lesson is the one this
147
+ suite is built around: a fixed single-instance objective measures lookup and
148
+ problem-solving identically, and only varying the instance across partitions
149
+ separates them.
150
+
151
+ Regenerate the figure from any session directory:
152
+
153
+ ```bash
154
+ python examples/circle-packing/make_figure.py <session-dir> -o results/progress.svg
155
+ ```
156
+
157
+ ## Which backend
158
+
159
+ | Backend | Best for | Entry point |
160
+ | --- | --- | --- |
161
+ | **Harbor** — recommended | optimizing agents; untrusted or reproducibility-critical runs | `vero harbor run` |
162
+ | [Command harness](docs/guide.md#optimize-a-program-with-a-command-harness) | any language; a trusted local evaluator driven over versioned JSON | `vero run` |
163
+ | [Python tasks](docs/guide.md#python-benchmark-tasks) | Python evaluators via `scale-vero-tasks`, no JSON contract to write | `PythonTaskBackend` |
164
+ | [Native in-process](docs/guide.md#python-api) | fast trusted local runs; a coding agent editing a host-bound sandbox | `vero optimize` |
165
+
166
+ The target and evaluator do not have to be Python: external evaluators and
167
+ producers connect over command protocols.
168
+
169
+ ## What you get
170
+
171
+ | | |
172
+ | --- | --- |
173
+ | **Any target** | a program, text, or an agent — anything Git-versioned and scoreable |
174
+ | **Any producer** | a coding agent (any provider via LiteLLM), an external command, or a custom strategy |
175
+ | **Durable and inspectable** | every candidate is versioned and re-selectable; tool calls and evaluations stream to an event log |
176
+ | **Population search** | `EvolutionaryStrategy` fans out N offspring per round with tournament selection |
177
+ | **Metered** | per-scope token accounting through the gateway, with per-case cost and latency distributions |
178
+
179
+ ## Where things are
180
+
181
+ | Path | What |
182
+ | --- | --- |
183
+ | [`docs/guide.md`](docs/guide.md) | the full guide: Harbor, command harness, Python API, tasks, sessions, concepts, safety boundaries |
184
+ | [`docs/harbor-architecture.md`](docs/harbor-architecture.md) | how the contained run is assembled, module by module |
185
+ | [`docs/agent-setup-guide.md`](docs/agent-setup-guide.md) | getting a coding agent wired up |
186
+ | [`examples/`](examples/) | c-matmul (no credentials), circle-packing, harbor-circle-packing, harness-conformance |
187
+ | [`src/vero/`](src/vero/) | the library: optimization kernel, runtime, gateway, sidecar, CLI, agent adapters |
188
+
189
+ For end-to-end agent-optimization benchmarks, see
190
+ [`../harness-engineering-bench/`](../harness-engineering-bench/), which also
191
+ documents how each coding agent must be pointed at the gateway — the one thing
192
+ that reliably costs a run when it is wrong.
193
+
194
+ ## Paper and reproduction
195
+
196
+ VeRO was introduced in [*VeRO: A Harness for Agents to Optimize
197
+ Agents*](https://arxiv.org/abs/2602.22480), accepted at ICML 2026. The paper
198
+ studies agent-harness optimization; the current library generalizes the same
199
+ version/evaluate/select loop to programs more broadly.
200
+
201
+ The frozen code for reproducing the paper is preserved on the `paper/v1` branch
202
+ and at the `paper-v1` tag:
203
+
204
+ ```bash
205
+ git checkout paper-v1
206
+ ```
207
+
208
+ The same pre-v0.5 tree is also readable in place under
209
+ [`../legacy/`](../legacy/). Note that it is `scale-vero` 0.4.7 and this is 0.5.0,
210
+ both importing as `vero`, so they cannot share a virtualenv.
211
+
212
+ ## Development
213
+
214
+ ```bash
215
+ uv sync --all-extras
216
+ uv run pytest tests/test_v05_*.py
217
+ ```
218
+
219
+ VeRO is licensed under the MIT License.
@@ -0,0 +1,186 @@
1
+ # VeRO: a harness for agents to optimize programs, text, and agents
2
+
3
+ [![Paper](https://img.shields.io/badge/arXiv-2602.22480-b31b1b.svg)](https://arxiv.org/abs/2602.22480)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](../LICENSE)
5
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/)
6
+
7
+ VeRO gives an optimizer something to edit, a controlled way to evaluate it, and
8
+ durable memory of everything it tried. The target is anything you can put under
9
+ Git and score — a **program** (one function to a whole repo), **text** (a prompt,
10
+ spec, or config), or an **agent** (its scaffold, tools, and prompts).
11
+
12
+ VeRO runs the same **version → evaluate → select** loop over all of them. *Where*
13
+ each candidate is produced and contained is a swappable backend, and **Harbor is
14
+ the recommended one**: it runs the whole coding agent inside a reproducible,
15
+ credential-isolated container and scores it against a trusted evaluation sidecar.
16
+ That is the right default for optimizing agents and for any untrusted or
17
+ reproducibility-critical run. Lighter local backends exist for trusted work that
18
+ does not need containment.
19
+
20
+ ```
21
+ ┌─────────────────────────┐ submit candidate ┌─────────────────────────┐
22
+ │ candidate production ├──────────────────────►│ evaluation service │
23
+ │ │ │ │
24
+ │ coding agent, command, │◄──────────────────────┤ owns cases + scoring │
25
+ │ or custom strategy; │ score + diagnostics │ │
26
+ │ edits its own Git │ │ development: may ask │
27
+ │ worktree per candidate │ │ validation: aggregate │
28
+ └───────────┬─────────────┘ │ test: withheld │
29
+ │ commit └───────────┬─────────────┘
30
+ ▼ │ report
31
+ ┌─────────────────────────┐ next round ┌───────────────▼─────────────┐
32
+ │ candidate history: │◄──────────────────┤ selection: keep the best │
33
+ │ every version kept, │ │ feasible candidate │
34
+ │ each one re-selectable │ └─────────────────────────────┘
35
+ └─────────────────────────┘
36
+
37
+ Every model call on both sides goes through the inference gateway, which holds
38
+ the provider key and meters spend in tokens against a per-scope budget.
39
+ ```
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ uv sync --extra optimize # or --all-extras for the full toolchain
45
+ uv run vero --help
46
+ ```
47
+
48
+ > The published distribution is **`scaleapi-vero`** (`pip install scaleapi-vero`);
49
+ > it imports as `vero`. Do **not** install `scale-vero` from PyPI — that name is
50
+ > an unrelated placeholder squatted in July 2026, not VeRO.
51
+
52
+ Python 3.11–3.13. 3.14 is excluded because litellm does not build there.
53
+
54
+ ## Quickstart — no credentials needed
55
+
56
+ The C matrix-multiplication example is deterministic and runs with **no model
57
+ credentials at all**. Its editable target contains only C; a trusted external
58
+ harness compiles it, checks correctness, and measures latency.
59
+
60
+ ```bash
61
+ cd examples/c-matmul/target
62
+ git init -b main && git add .
63
+ git -c user.name=vero -c user.email=vero@localhost commit -m baseline
64
+ cd ..
65
+
66
+ uv run vero evaluate --config vero.toml # score the baseline
67
+ uv run vero run --config vero.toml # optimize
68
+ ```
69
+
70
+ VeRO evaluates the baseline, gives an isolated worktree to the configured
71
+ producer, evaluates its commit, selects the faster feasible result, and leaves
72
+ the original target untouched.
73
+
74
+ ## Examples
75
+
76
+ Each is a complete, checked-in target plus harness — clone-and-run, not a sketch.
77
+
78
+ | Example | Optimizes | Needs |
79
+ | --- | --- | --- |
80
+ | [`c-matmul`](examples/c-matmul/) | a C matmul kernel, for latency under a correctness constraint | **nothing** — deterministic, no credentials |
81
+ | [`circle-packing`](examples/circle-packing/) | a packing algorithm: 26 circles in a unit square, maximizing the sum of radii | a model, via `LITELLM_BASE_URL`/`LITELLM_API_KEY` or `OPENAI_BASE_URL`/`OPENAI_API_KEY` |
82
+ | [`harbor-circle-packing`](examples/harbor-circle-packing/) | the same target, but with the agent contained and scored by a sidecar | Docker + credentials |
83
+ | [`harness-conformance`](examples/harness-conformance/) | nothing — it checks the *stack*: whether a new agent or model can actually drive a run | credentials for the pair under test |
84
+
85
+ Run `harness-conformance` before spending a real benchmark on a new harness or
86
+ model. Every harness addresses its provider differently, and it costs minutes to
87
+ find that out instead of hours.
88
+
89
+ ### A real run, end to end
90
+
91
+ `harbor-circle-packing` runs a coding agent in a container, scores each candidate
92
+ through a trusted sidecar, and finalizes on a `test` partition the agent never
93
+ touches. One run with `mini-swe-agent` and `claude-sonnet-5`:
94
+
95
+ ![circle-packing search progress](examples/harbor-circle-packing/results/progress.svg)
96
+
97
+ **0.9598 → 2.5766 on the held-out partition**, `shipped: true`, in about an hour.
98
+ The best published result for 26 circles is ~2.635. The agent wrote a 15 KB
99
+ Lubachevsky–Stillinger-style growth algorithm with LP refinement — no hardcoded
100
+ coordinates.
101
+
102
+ Two details worth reading off the left panel. The red point is an **infeasible**
103
+ candidate: it scored 2.5341 but overlapped, the harness rejected it on the
104
+ `valid == 1` constraint, and the agent's next commit was "Add safety margin to
105
+ guarantee strict feasibility". And the last five evaluations are flat — it found
106
+ the idea early, then polished.
107
+
108
+ **The cautionary half.** The same task run with `codex` and no prohibition on
109
+ hardcoding scored **2.6360 in eight minutes** — higher than the honest run — by
110
+ copying the published Packomania table into 26 coordinate literals. It satisfies
111
+ the objective exactly and held-out scoring cannot catch it, because every
112
+ partition here holds one deterministic case, so a memorized answer transfers
113
+ perfectly. The instruction now forbids it. The general lesson is the one this
114
+ suite is built around: a fixed single-instance objective measures lookup and
115
+ problem-solving identically, and only varying the instance across partitions
116
+ separates them.
117
+
118
+ Regenerate the figure from any session directory:
119
+
120
+ ```bash
121
+ python examples/circle-packing/make_figure.py <session-dir> -o results/progress.svg
122
+ ```
123
+
124
+ ## Which backend
125
+
126
+ | Backend | Best for | Entry point |
127
+ | --- | --- | --- |
128
+ | **Harbor** — recommended | optimizing agents; untrusted or reproducibility-critical runs | `vero harbor run` |
129
+ | [Command harness](docs/guide.md#optimize-a-program-with-a-command-harness) | any language; a trusted local evaluator driven over versioned JSON | `vero run` |
130
+ | [Python tasks](docs/guide.md#python-benchmark-tasks) | Python evaluators via `scale-vero-tasks`, no JSON contract to write | `PythonTaskBackend` |
131
+ | [Native in-process](docs/guide.md#python-api) | fast trusted local runs; a coding agent editing a host-bound sandbox | `vero optimize` |
132
+
133
+ The target and evaluator do not have to be Python: external evaluators and
134
+ producers connect over command protocols.
135
+
136
+ ## What you get
137
+
138
+ | | |
139
+ | --- | --- |
140
+ | **Any target** | a program, text, or an agent — anything Git-versioned and scoreable |
141
+ | **Any producer** | a coding agent (any provider via LiteLLM), an external command, or a custom strategy |
142
+ | **Durable and inspectable** | every candidate is versioned and re-selectable; tool calls and evaluations stream to an event log |
143
+ | **Population search** | `EvolutionaryStrategy` fans out N offspring per round with tournament selection |
144
+ | **Metered** | per-scope token accounting through the gateway, with per-case cost and latency distributions |
145
+
146
+ ## Where things are
147
+
148
+ | Path | What |
149
+ | --- | --- |
150
+ | [`docs/guide.md`](docs/guide.md) | the full guide: Harbor, command harness, Python API, tasks, sessions, concepts, safety boundaries |
151
+ | [`docs/harbor-architecture.md`](docs/harbor-architecture.md) | how the contained run is assembled, module by module |
152
+ | [`docs/agent-setup-guide.md`](docs/agent-setup-guide.md) | getting a coding agent wired up |
153
+ | [`examples/`](examples/) | c-matmul (no credentials), circle-packing, harbor-circle-packing, harness-conformance |
154
+ | [`src/vero/`](src/vero/) | the library: optimization kernel, runtime, gateway, sidecar, CLI, agent adapters |
155
+
156
+ For end-to-end agent-optimization benchmarks, see
157
+ [`../harness-engineering-bench/`](../harness-engineering-bench/), which also
158
+ documents how each coding agent must be pointed at the gateway — the one thing
159
+ that reliably costs a run when it is wrong.
160
+
161
+ ## Paper and reproduction
162
+
163
+ VeRO was introduced in [*VeRO: A Harness for Agents to Optimize
164
+ Agents*](https://arxiv.org/abs/2602.22480), accepted at ICML 2026. The paper
165
+ studies agent-harness optimization; the current library generalizes the same
166
+ version/evaluate/select loop to programs more broadly.
167
+
168
+ The frozen code for reproducing the paper is preserved on the `paper/v1` branch
169
+ and at the `paper-v1` tag:
170
+
171
+ ```bash
172
+ git checkout paper-v1
173
+ ```
174
+
175
+ The same pre-v0.5 tree is also readable in place under
176
+ [`../legacy/`](../legacy/). Note that it is `scale-vero` 0.4.7 and this is 0.5.0,
177
+ both importing as `vero`, so they cannot share a virtualenv.
178
+
179
+ ## Development
180
+
181
+ ```bash
182
+ uv sync --all-extras
183
+ uv run pytest tests/test_v05_*.py
184
+ ```
185
+
186
+ VeRO is licensed under the MIT License.
@@ -0,0 +1,133 @@
1
+ # VeRO setup guide (for coding agents)
2
+
3
+ This guide helps a coding agent (Claude, Cursor, Copilot, …) set up and run a
4
+ VeRO optimization for a user. VeRO optimizes a **versioned program** against an
5
+ **evaluation**: a producer (usually a coding agent) proposes candidate edits, a
6
+ trusted evaluator scores them, and the best candidate is selected.
7
+
8
+ You do two things: (1) author an **evaluation harness**, and (2) run the
9
+ **optimizer**. There is no `.veroaccess`, `Policy`, or resource/namespace setup —
10
+ those were removed. Containment now comes from the sandbox the producer runs in,
11
+ and disclosure is controlled per evaluation set.
12
+
13
+ ## Before you start
14
+
15
+ Understand the user's program (what it does, how it's invoked, what "better"
16
+ means) and read a matching example:
17
+
18
+ - `examples/c-matmul/` — a language-neutral **command harness** + `vero.toml`.
19
+ - `examples/circle-packing/` — a Python program scored by a command harness.
20
+ - `../vero-tasks/examples/matmul-{kernel,eval}/` — a **Python task** using the
21
+ `scale-vero-tasks` protocol.
22
+ - `examples/harbor-circle-packing/` — a **Harbor** outer loop (contained agent)
23
+ with a simple command inner loop.
24
+
25
+ ## 1. Author the evaluation
26
+
27
+ Pick whichever fits the user's program.
28
+
29
+ ### Option A — command harness (any language)
30
+
31
+ Write a script that reads a request JSON and writes a report JSON. VeRO's
32
+ `CommandBackend` invokes it with placeholders it substitutes at run time:
33
+
34
+ ```bash
35
+ python evaluate.py --workspace {workspace} --request {request} \
36
+ --report {report} --artifacts {artifacts}
37
+ ```
38
+
39
+ - `{workspace}` — the candidate checkout to score.
40
+ - `{request}` — JSON: `{"schema_version": 1, "request": {"seed": <int|null>, ...}}`.
41
+ - `{report}` — write JSON: `{"schema_version": 1, "status": "success",
42
+ "metrics": {"<name>": <float>, ...}}` (a **dict of metrics** — one becomes the
43
+ objective; others can be constraints or diagnostics).
44
+
45
+ See `examples/circle-packing/harness/` for a complete scorer.
46
+
47
+ ### Option B — Python task (`scale-vero-tasks`)
48
+
49
+ For Python benchmarks, use the task protocol (`../vero-tasks`):
50
+
51
+ ```python
52
+ from vero_tasks import TaskContext, TaskOutput, TaskResult, create_task
53
+
54
+ task = create_task("main", required_env_vars=["OPENAI_API_KEY"])
55
+
56
+ @task.inference()
57
+ async def infer(case: dict, context: TaskContext) -> TaskOutput:
58
+ from my_agent import run_agent
59
+ return TaskOutput(output=await run_agent(case["question"]))
60
+
61
+ @task.evaluation()
62
+ async def evaluate(case: dict, output: TaskOutput, context: TaskContext) -> TaskResult:
63
+ return TaskResult.from_task_output(
64
+ output, score=float(output.output == case["answer"])
65
+ )
66
+ ```
67
+
68
+ The `scale-vero-tasks` runner adapts this to the same command-harness contract.
69
+ See `../vero-tasks/README.md` and `../vero-tasks/examples/matmul-eval/`.
70
+
71
+ **Rules:** functions are `async`; let exceptions propagate (VeRO records them as
72
+ errored cases); keep heavy imports inside functions; declare API keys via
73
+ `required_env_vars`; the score is a float (define whether higher or lower is
74
+ better via the objective's `direction`).
75
+
76
+ ## 2. Run the optimizer
77
+
78
+ The target must be a git repo whose working tree is clean.
79
+
80
+ ### Config-driven
81
+
82
+ ```bash
83
+ vero init ./run # scaffolds run/vero.toml (+ target/, harness/)
84
+ # edit run/vero.toml
85
+ vero check --config run/vero.toml # validate paths, git, eval refs
86
+ vero evaluate --config run/vero.toml # score the baseline only
87
+ vero run --config run/vero.toml # optimize
88
+ ```
89
+
90
+ `vero.toml` sections: `[target]` (root, ref), `[backend]` (kind = `command`,
91
+ `harness_root`, `command`), one or more `[[evaluations]]` (name, partition,
92
+ `agent_can_evaluate`, `disclosure`, optional `agent_budget`), `[protocol]`
93
+ (`selection_evaluation`, `final_evaluation`, `max_proposals`), `[objective]`
94
+ (metric, direction), and `[optimizer]` (`kind = "vero"`, optional `model`,
95
+ `instruction`).
96
+
97
+ ### One-shot (flags)
98
+
99
+ ```bash
100
+ vero optimize ./target \
101
+ --harness-root ./harness \
102
+ --evaluate "python3 {harness}/evaluate.py --workspace {workspace} --request {request} --report {report} --artifacts {artifacts}" \
103
+ --agent vero \
104
+ --instruction "Improve the program without changing its intended behavior." \
105
+ --metric score --direction maximize \
106
+ --evaluation-set default --max-proposals 4 --max-turns 60
107
+ ```
108
+
109
+ ## 3. The optimizer agent (`--agent vero`)
110
+
111
+ `VeroAgent` runs on the OpenAI Agents SDK. Its harness runs on the host; its
112
+ shell/file effects run inside a sandbox (bound to the candidate checkout) via
113
+ function tools (`shell`, `read_file`, `write_file`), plus an `evaluate` tool for
114
+ mid-run self-scoring. There are no custom bash/grep/git tools to configure and no
115
+ in-process ACLs — the sandbox is the boundary.
116
+
117
+ - **Model:** any provider via LiteLLM. Set `VERO_OPTIMIZER_MODEL`
118
+ (e.g. `openai/gpt-5.4`, `anthropic/claude-sonnet-4-5-...`) or `[optimizer] model`.
119
+ - **Containment:** the sandbox client is the seam — local for fast/trusted runs;
120
+ for a contained/untrusted agent, run it through **Harbor** (see
121
+ `examples/harbor-circle-packing/`).
122
+ - **Strategy:** the default proposes one candidate per round; for
123
+ population/evolutionary search use `EvolutionaryStrategy`
124
+ (`vero.optimization.EvolutionaryStrategy`).
125
+
126
+ ## Don't
127
+
128
+ - Don't let the harness/task code be edited during optimization — it scores the
129
+ candidate and must stay fixed (keep it in `--harness-root`, outside the target).
130
+ - Don't hardcode absolute paths in harness/task code; use the `{...}` placeholders
131
+ and request parameters.
132
+ - Don't suppress exceptions in inference/evaluation — VeRO records them.
133
+ - Don't put secrets in code; declare them as env vars.