orizu 0.5.19 → 0.5.21
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.
- package/README.md +23 -0
- package/dist/archive-artifacts-cli.d.ts +50 -0
- package/dist/archive-artifacts-cli.d.ts.map +1 -0
- package/dist/artifact-archive.d.ts +48 -0
- package/dist/artifact-archive.d.ts.map +1 -0
- package/dist/artifact-pull.d.ts +22 -0
- package/dist/artifact-pull.d.ts.map +1 -0
- package/dist/banner.d.ts +3 -0
- package/dist/banner.d.ts.map +1 -0
- package/dist/connectors-cli.d.ts +31 -0
- package/dist/connectors-cli.d.ts.map +1 -0
- package/dist/credentials.d.ts +46 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/csv.d.ts +49 -0
- package/dist/csv.d.ts.map +1 -0
- package/dist/dataset-download.d.ts +6 -0
- package/dist/dataset-download.d.ts.map +1 -0
- package/dist/dataset-edit-rows.d.ts +10 -0
- package/dist/dataset-edit-rows.d.ts.map +1 -0
- package/dist/dataset-upload-snapshot.d.ts +13 -0
- package/dist/dataset-upload-snapshot.d.ts.map +1 -0
- package/dist/daytona-slice-rehearsal.d.ts +89 -0
- package/dist/daytona-slice-rehearsal.d.ts.map +1 -0
- package/dist/daytona-slice.d.ts +106 -0
- package/dist/daytona-slice.d.ts.map +1 -0
- package/dist/deploy-key-merge-core.d.ts +121 -0
- package/dist/deploy-key-merge-core.d.ts.map +1 -0
- package/dist/diff-comments-cli.d.ts +12 -0
- package/dist/diff-comments-cli.d.ts.map +1 -0
- package/dist/diff-comments-cli.js +21 -2
- package/dist/egress-allowlist-cli.d.ts +23 -0
- package/dist/egress-allowlist-cli.d.ts.map +1 -0
- package/dist/egress-policy.d.ts +108 -0
- package/dist/egress-policy.d.ts.map +1 -0
- package/dist/error-response.d.ts +9 -0
- package/dist/error-response.d.ts.map +1 -0
- package/dist/file-parser.d.ts +5 -0
- package/dist/file-parser.d.ts.map +1 -0
- package/dist/gepa-engine-dispatch.d.ts +9 -0
- package/dist/gepa-engine-dispatch.d.ts.map +1 -0
- package/dist/gepa-engine-dispatch.js +307 -0
- package/dist/gepa-python-command.d.ts +6 -0
- package/dist/gepa-python-command.d.ts.map +1 -0
- package/dist/gepa-python-command.js +26 -0
- package/dist/gepa-python-paths.d.ts +6 -0
- package/dist/gepa-python-paths.d.ts.map +1 -0
- package/dist/gepa-python-paths.js +42 -0
- package/dist/git-credential.d.ts +69 -0
- package/dist/git-credential.d.ts.map +1 -0
- package/dist/git-recovery-environment.d.ts +31 -0
- package/dist/git-recovery-environment.d.ts.map +1 -0
- package/dist/github-setup.d.ts +122 -0
- package/dist/github-setup.d.ts.map +1 -0
- package/dist/global-flags.d.ts +12 -0
- package/dist/global-flags.d.ts.map +1 -0
- package/dist/help.d.ts +46 -0
- package/dist/help.d.ts.map +1 -0
- package/dist/help.js +93 -25
- package/dist/hosted-boot.d.ts +273 -0
- package/dist/hosted-boot.d.ts.map +1 -0
- package/dist/hosted-bootstrap-rehearsal.d.ts +86 -0
- package/dist/hosted-bootstrap-rehearsal.d.ts.map +1 -0
- package/dist/hosted-bootstrap.d.ts +188 -0
- package/dist/hosted-bootstrap.d.ts.map +1 -0
- package/dist/hosted-broker-server.d.ts +50 -0
- package/dist/hosted-broker-server.d.ts.map +1 -0
- package/dist/hosted-git-http-server.d.ts +36 -0
- package/dist/hosted-git-http-server.d.ts.map +1 -0
- package/dist/hosted-harness-claude.d.ts +195 -0
- package/dist/hosted-harness-claude.d.ts.map +1 -0
- package/dist/hosted-harness-opencode.d.ts +227 -0
- package/dist/hosted-harness-opencode.d.ts.map +1 -0
- package/dist/hosted-harness.d.ts +118 -0
- package/dist/hosted-harness.d.ts.map +1 -0
- package/dist/hosted-harvest.d.ts +68 -0
- package/dist/hosted-harvest.d.ts.map +1 -0
- package/dist/hosted-headless.d.ts +72 -0
- package/dist/hosted-headless.d.ts.map +1 -0
- package/dist/hosted-loop-lifecycle.d.ts +206 -0
- package/dist/hosted-loop-lifecycle.d.ts.map +1 -0
- package/dist/hosted-loop.d.ts +170 -0
- package/dist/hosted-loop.d.ts.map +1 -0
- package/dist/hosted-run-event-sink.d.ts +222 -0
- package/dist/hosted-run-event-sink.d.ts.map +1 -0
- package/dist/hosted-runtime-assets.d.ts +186 -0
- package/dist/hosted-runtime-assets.d.ts.map +1 -0
- package/dist/hosted-session-cli.d.ts +258 -0
- package/dist/hosted-session-cli.d.ts.map +1 -0
- package/dist/hosted-skill-staging.d.ts +73 -0
- package/dist/hosted-skill-staging.d.ts.map +1 -0
- package/dist/http.d.ts +8 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +119 -129
- package/dist/instruction-set-gepa-launch.d.ts +3 -0
- package/dist/instruction-set-gepa-launch.d.ts.map +1 -0
- package/dist/instruction-set-gepa-launch.js +15 -0
- package/dist/instruction-set-loader.d.ts +6 -0
- package/dist/instruction-set-loader.d.ts.map +1 -0
- package/dist/instruction-set-loader.js +59 -0
- package/dist/instruction-set-manifest.d.ts +14 -0
- package/dist/instruction-set-manifest.d.ts.map +1 -0
- package/dist/instruction-set-manifest.js +162 -0
- package/dist/instruction-sets-cli.d.ts +40 -0
- package/dist/instruction-sets-cli.d.ts.map +1 -0
- package/dist/instruction-sets-cli.js +361 -0
- package/dist/json-response.d.ts +4 -0
- package/dist/json-response.d.ts.map +1 -0
- package/dist/jsonl-stream.d.ts +8 -0
- package/dist/jsonl-stream.d.ts.map +1 -0
- package/dist/kill-switch-cli.d.ts +30 -0
- package/dist/kill-switch-cli.d.ts.map +1 -0
- package/dist/loopback-serve.d.ts +25 -0
- package/dist/loopback-serve.d.ts.map +1 -0
- package/dist/manifests-cli.d.ts +22 -0
- package/dist/manifests-cli.d.ts.map +1 -0
- package/dist/markdown-report-input.d.ts +7 -0
- package/dist/markdown-report-input.d.ts.map +1 -0
- package/dist/markdown-report-input.js +15 -1
- package/dist/merge-job.d.ts +155 -0
- package/dist/merge-job.d.ts.map +1 -0
- package/dist/model-configs-cli.d.ts +19 -0
- package/dist/model-configs-cli.d.ts.map +1 -0
- package/dist/model-configs-cli.js +104 -0
- package/dist/optimization-export-cli.d.ts +19 -0
- package/dist/optimization-export-cli.d.ts.map +1 -0
- package/dist/optimizations-list-cli.d.ts +20 -0
- package/dist/optimizations-list-cli.d.ts.map +1 -0
- package/dist/optimizations-promote-cli.d.ts +8 -0
- package/dist/optimizations-promote-cli.d.ts.map +1 -0
- package/dist/optimizations-promote-cli.js +34 -0
- package/dist/option-validation.d.ts +15 -0
- package/dist/option-validation.d.ts.map +1 -0
- package/dist/preview-runtime.d.ts +63 -0
- package/dist/preview-runtime.d.ts.map +1 -0
- package/dist/prompt-draft-push.d.ts +60 -0
- package/dist/prompt-draft-push.d.ts.map +1 -0
- package/dist/prompt-label-cli.d.ts +11 -0
- package/dist/prompt-label-cli.d.ts.map +1 -0
- package/dist/prompt-label-cli.js +29 -0
- package/dist/prompt-length-wire.d.ts +28 -0
- package/dist/prompt-length-wire.d.ts.map +1 -0
- package/dist/prompt-length-wire.js +2 -2
- package/dist/prompt-report-cli.d.ts +10 -0
- package/dist/prompt-report-cli.d.ts.map +1 -0
- package/dist/prompt-report-cli.js +2 -2
- package/dist/prompt-summary-table.d.ts +15 -0
- package/dist/prompt-summary-table.d.ts.map +1 -0
- package/dist/prompt-summary-table.js +6 -0
- package/dist/registration-tag-warning.d.ts +32 -0
- package/dist/registration-tag-warning.d.ts.map +1 -0
- package/dist/report-comments-cli.d.ts +16 -0
- package/dist/report-comments-cli.d.ts.map +1 -0
- package/dist/report-markdown-blankness.d.ts +2 -0
- package/dist/report-markdown-blankness.d.ts.map +1 -0
- package/dist/report-markdown-blankness.js +6 -0
- package/dist/report-replacement-warning.d.ts +17 -0
- package/dist/report-replacement-warning.d.ts.map +1 -0
- package/dist/report-replacement-warning.js +31 -0
- package/dist/repository-backup-core.d.ts +225 -0
- package/dist/repository-backup-core.d.ts.map +1 -0
- package/dist/repository-recovery-manifest.d.ts +83 -0
- package/dist/repository-recovery-manifest.d.ts.map +1 -0
- package/dist/run-event-digest.d.ts +74 -0
- package/dist/run-event-digest.d.ts.map +1 -0
- package/dist/runner-dir-verify.d.ts +66 -0
- package/dist/runner-dir-verify.d.ts.map +1 -0
- package/dist/runner-instruction-set-contract.d.ts +24 -0
- package/dist/runner-instruction-set-contract.d.ts.map +1 -0
- package/dist/runner-instruction-set-contract.js +50 -0
- package/dist/sandbox-hygiene.d.ts +45 -0
- package/dist/sandbox-hygiene.d.ts.map +1 -0
- package/dist/sandbox-provider.d.ts +193 -0
- package/dist/sandbox-provider.d.ts.map +1 -0
- package/dist/scorer-draft-push.d.ts +50 -0
- package/dist/scorer-draft-push.d.ts.map +1 -0
- package/dist/scorers-cli.d.ts +20 -0
- package/dist/scorers-cli.d.ts.map +1 -0
- package/dist/scorers-cli.js +22 -0
- package/dist/scorers-verify-parity-bridge.d.ts +16 -0
- package/dist/scorers-verify-parity-bridge.d.ts.map +1 -0
- package/dist/scorers-verify-parity-bridge.js +90 -0
- package/dist/scorers-verify-parity.d.ts +81 -0
- package/dist/scorers-verify-parity.d.ts.map +1 -0
- package/dist/scorers-verify-parity.js +502 -0
- package/dist/scores-accept-cli.d.ts +21 -0
- package/dist/scores-accept-cli.d.ts.map +1 -0
- package/dist/secret-redaction.d.ts +47 -0
- package/dist/secret-redaction.d.ts.map +1 -0
- package/dist/session-timeline.d.ts +54 -0
- package/dist/session-timeline.d.ts.map +1 -0
- package/dist/setup-prompt.d.ts +5 -0
- package/dist/setup-prompt.d.ts.map +1 -0
- package/dist/skill-installer.d.ts +68 -0
- package/dist/skill-installer.d.ts.map +1 -0
- package/dist/skilled-proposer-launch.d.ts +7 -0
- package/dist/skilled-proposer-launch.d.ts.map +1 -0
- package/dist/skilled-proposer-launch.js +60 -0
- package/dist/smoke.d.ts +102 -0
- package/dist/smoke.d.ts.map +1 -0
- package/dist/start-intent.d.ts +12 -0
- package/dist/start-intent.d.ts.map +1 -0
- package/dist/task-assignment-manifest.d.ts +15 -0
- package/dist/task-assignment-manifest.d.ts.map +1 -0
- package/dist/task-create-error.d.ts +18 -0
- package/dist/task-create-error.d.ts.map +1 -0
- package/dist/team-connectors-cli.d.ts +29 -0
- package/dist/team-connectors-cli.d.ts.map +1 -0
- package/dist/types.d.ts +39 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/vercel-sandbox-provider.d.ts +156 -0
- package/dist/vercel-sandbox-provider.d.ts.map +1 -0
- package/dist/workbench-cli.d.ts +233 -0
- package/dist/workbench-cli.d.ts.map +1 -0
- package/dist/workspace-sync.d.ts +207 -0
- package/dist/workspace-sync.d.ts.map +1 -0
- package/dist/workspace.d.ts +92 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/zip-draft-push.d.ts +55 -0
- package/dist/zip-draft-push.d.ts.map +1 -0
- package/package.json +15 -2
- package/requirements/README.md +138 -0
- package/requirements/skilled-proposer.in +66 -0
- package/requirements/skilled-proposer.lock +265 -0
- package/scripts/build-cli-dist.mjs +30 -0
- package/scripts/ensure-skilled-proposer-venv.mjs +5 -0
- package/scripts/orizu-source-checkout.d.mts +1 -0
- package/scripts/orizu-source-checkout.mjs +10 -0
- package/scripts/refresh-skilled-proposer-lock.mjs +256 -0
- package/scripts/vendor-gepa-python.mjs +187 -4
- package/src/diff-comments-cli.ts +41 -3
- package/src/gepa-engine-dispatch.ts +340 -0
- package/src/gepa-python-command.ts +31 -0
- package/src/gepa-python-paths.ts +56 -0
- package/src/help.ts +95 -25
- package/src/index.ts +131 -166
- package/src/instruction-set-gepa-launch.ts +28 -0
- package/src/instruction-set-loader.ts +37 -0
- package/src/instruction-set-manifest.ts +120 -0
- package/src/instruction-sets-cli.ts +306 -0
- package/src/markdown-report-input.ts +19 -1
- package/src/model-configs-cli.ts +119 -0
- package/src/optimizations-promote-cli.ts +41 -0
- package/src/prompt-label-cli.ts +55 -0
- package/src/prompt-length-wire.ts +1 -1
- package/src/prompt-report-cli.ts +2 -2
- package/src/prompt-summary-table.ts +12 -0
- package/src/report-markdown-blankness.ts +6 -0
- package/src/report-replacement-warning.ts +35 -0
- package/src/runner-instruction-set-contract.ts +64 -0
- package/src/scorers-cli.ts +40 -0
- package/src/scorers-verify-parity-bridge.ts +90 -0
- package/src/scorers-verify-parity.ts +564 -0
- package/src/skilled-proposer-launch.ts +89 -0
- package/src/skilled-proposer-venv-manager.mjs +757 -0
- package/tsconfig.json +2 -0
- package/vendor/gepa-python/LICENSE +7 -0
- package/vendor/gepa-python/manifest.json +107 -0
- package/vendor/gepa-python/src/gepa/__init__.py +22 -0
- package/vendor/gepa-python/src/gepa/adapters/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/__init__.py +1 -0
- package/vendor/gepa-python/src/gepa/adapters/anymaths_adapter/anymaths_adapter.py +174 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/__init__.py +26 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/confidence_adapter.py +618 -0
- package/vendor/gepa-python/src/gepa/adapters/confidence_adapter/scoring.py +206 -0
- package/vendor/gepa-python/src/gepa/adapters/default_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/default_adapter/default_adapter.py +206 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/dspy_adapter.py +525 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_adapter/instruction_proposal.py +500 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/__init__.py +6 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/dspy_program_proposal_signature.py +137 -0
- package/vendor/gepa-python/src/gepa/adapters/dspy_full_program_adapter/full_program_adapter.py +269 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/__init__.py +56 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/evaluation_metrics.py +226 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/generic_rag_adapter.py +496 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/rag_pipeline.py +238 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_store_interface.py +212 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/__init__.py +2 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/chroma_store.py +196 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/lancedb_store.py +422 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/milvus_store.py +409 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/qdrant_store.py +368 -0
- package/vendor/gepa-python/src/gepa/adapters/generic_rag_adapter/vector_stores/weaviate_store.py +418 -0
- package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/__init__.py +11 -0
- package/vendor/gepa-python/src/gepa/adapters/langchain_adapter/langchain_adapter.py +261 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/__init__.py +37 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_adapter.py +693 -0
- package/vendor/gepa-python/src/gepa/adapters/mcp_adapter/mcp_client.py +364 -0
- package/vendor/gepa-python/src/gepa/adapters/optimize_anything_adapter/optimize_anything_adapter.py +879 -0
- package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/adapters/terminal_bench_adapter/terminal_bench_adapter.py +217 -0
- package/vendor/gepa-python/src/gepa/api.py +468 -0
- package/vendor/gepa-python/src/gepa/core/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/core/adapter.py +227 -0
- package/vendor/gepa-python/src/gepa/core/callbacks.py +551 -0
- package/vendor/gepa-python/src/gepa/core/data_loader.py +74 -0
- package/vendor/gepa-python/src/gepa/core/engine.py +1025 -0
- package/vendor/gepa-python/src/gepa/core/result.py +271 -0
- package/vendor/gepa-python/src/gepa/core/state.py +706 -0
- package/vendor/gepa-python/src/gepa/examples/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/examples/aime.py +24 -0
- package/vendor/gepa-python/src/gepa/examples/anymaths-bench/eval_default.py +111 -0
- package/vendor/gepa-python/src/gepa/examples/anymaths-bench/train_anymaths.py +177 -0
- package/vendor/gepa-python/src/gepa/examples/mcp_adapter/__init__.py +4 -0
- package/vendor/gepa-python/src/gepa/examples/mcp_adapter/mcp_optimization_example.py +456 -0
- package/vendor/gepa-python/src/gepa/examples/rag_adapter/__init__.py +9 -0
- package/vendor/gepa-python/src/gepa/examples/rag_adapter/rag_optimization.py +824 -0
- package/vendor/gepa-python/src/gepa/examples/terminal-bench/train_terminus.py +161 -0
- package/vendor/gepa-python/src/gepa/gepa_utils.py +117 -0
- package/vendor/gepa-python/src/gepa/gskill/__init__.py +1 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/cost_tracker.py +194 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code.py +1117 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/claude_code_skills.py +613 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/evaluate/mini_swe_agent.py +440 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/experiment_logger.py +367 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/swe_fitness_fn.py +209 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/swe_harness.py +352 -0
- package/vendor/gepa-python/src/gepa/gskill/gskill/train_optimize_anything.py +830 -0
- package/vendor/gepa-python/src/gepa/image.py +104 -0
- package/vendor/gepa-python/src/gepa/lm.py +261 -0
- package/vendor/gepa-python/src/gepa/logging/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/logging/experiment_tracker.py +457 -0
- package/vendor/gepa-python/src/gepa/logging/logger.py +75 -0
- package/vendor/gepa-python/src/gepa/logging/utils.py +130 -0
- package/vendor/gepa-python/src/gepa/optimize_anything.py +1701 -0
- package/vendor/gepa-python/src/gepa/proposer/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/proposer/base.py +53 -0
- package/vendor/gepa-python/src/gepa/proposer/merge.py +403 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/base.py +64 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflection_lm.py +178 -0
- package/vendor/gepa-python/src/gepa/proposer/reflective_mutation/reflective_mutation.py +641 -0
- package/vendor/gepa-python/src/gepa/py.typed +0 -0
- package/vendor/gepa-python/src/gepa/strategies/__init__.py +0 -0
- package/vendor/gepa-python/src/gepa/strategies/acceptance.py +66 -0
- package/vendor/gepa-python/src/gepa/strategies/batch_sampler.py +103 -0
- package/vendor/gepa-python/src/gepa/strategies/candidate_selector.py +82 -0
- package/vendor/gepa-python/src/gepa/strategies/component_selector.py +36 -0
- package/vendor/gepa-python/src/gepa/strategies/eval_policy.py +64 -0
- package/vendor/gepa-python/src/gepa/strategies/instruction_proposal.py +153 -0
- package/vendor/gepa-python/src/gepa/strategies/proposal_sampling.py +128 -0
- package/vendor/gepa-python/src/gepa/strategies/proposal_selection.py +84 -0
- package/vendor/gepa-python/src/gepa/utils/__init__.py +63 -0
- package/vendor/gepa-python/src/gepa/utils/code_execution.py +626 -0
- package/vendor/gepa-python/src/gepa/utils/stdio_capture.py +145 -0
- package/vendor/gepa-python/src/gepa/utils/stop_condition.py +230 -0
- package/vendor/gepa-python/src/gepa/visualization.py +359 -0
- package/vendor/orizu-gepa/pyproject.toml +18 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/__init__.py +9 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/__main__.py +5 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/adapter.py +138 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/callbacks.py +666 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/cli.py +7 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/engine.py +269 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/instruction_set_loader.py +52 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/preflight.py +64 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/reflection.py +186 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/runtime.py +721 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/skilled_proposer_bridge.py +381 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/stop_conditions.py +55 -0
- package/vendor/orizu-gepa/src/orizu_gepa_connector/translator.py +203 -0
- package/vendor/orizu-gepa-python/pyproject.toml +1 -1
- package/vendor/orizu-gepa-python/src/orizu_gepa/cli.py +1 -0
- package/vendor/orizu-gepa-python/src/orizu_gepa/client.py +52 -7
- package/vendor/orizu-gepa-python/src/orizu_gepa/local_log.py +52 -0
- package/vendor/orizu-gepa-python/src/orizu_gepa/optimizer.py +10 -5
- package/vendor/orizu-gepa-python/src/orizu_gepa/reflection.py +323 -68
- package/vendor/orizu-gepa-python/src/orizu_gepa/runner.py +207 -13
- package/vendor/skills/orizu-cli/SKILL.md +3 -1
- package/vendor/skills/orizu-cli/references/cli-reference.md +85 -1
- package/vendor/skills/orizu-cli/references/migrate-existing-gepa-setup.md +303 -0
- package/vendor/skills/orizu-cli/references/optimization-reports.md +1 -1
- package/vendor/skills/orizu-cli/references/optimization-with-gepa.md +26 -1
- package/vendor/skills/orizu-cli/references/prompt-control-plane.md +113 -10
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# Copyright (c) 2025 Lakshya A Agrawal and the GEPA contributors
|
|
2
|
+
# https://github.com/gepa-ai/gepa
|
|
3
|
+
|
|
4
|
+
from collections.abc import Mapping, Sequence
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import Any, Generic, Protocol, TypeVar
|
|
7
|
+
|
|
8
|
+
# Generic type aliases matching your original
|
|
9
|
+
RolloutOutput = TypeVar("RolloutOutput")
|
|
10
|
+
Trajectory = TypeVar("Trajectory")
|
|
11
|
+
DataInst = TypeVar("DataInst")
|
|
12
|
+
Candidate = dict[str, str]
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@dataclass
|
|
16
|
+
class EvaluationBatch(Generic[Trajectory, RolloutOutput]):
|
|
17
|
+
"""
|
|
18
|
+
Container for the result of evaluating a proposed candidate on a batch of data.
|
|
19
|
+
|
|
20
|
+
- outputs: raw per-example outputs from upon executing the candidate. GEPA does not interpret these;
|
|
21
|
+
they are forwarded to other parts of the user's code or logging as-is.
|
|
22
|
+
- scores: per-example numeric scores (floats). GEPA sums these for minibatch acceptance
|
|
23
|
+
and averages them over the full validation set for tracking/pareto fronts.
|
|
24
|
+
- trajectories: optional per-example traces used by make_reflective_dataset to build
|
|
25
|
+
a reflective dataset (See `GEPAAdapter.make_reflective_dataset`). If capture_traces=True is passed to `evaluate`, trajectories
|
|
26
|
+
should be provided and align one-to-one with `outputs` and `scores`.
|
|
27
|
+
- objective_scores: optional per-example maps of objective name -> score. Leave None when
|
|
28
|
+
the evaluator does not expose multi-objective metrics.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
outputs: list[RolloutOutput]
|
|
32
|
+
scores: list[float]
|
|
33
|
+
trajectories: list[Trajectory] | None = None
|
|
34
|
+
objective_scores: list[dict[str, float]] | None = None
|
|
35
|
+
num_metric_calls: int | None = None
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class BatchEvaluateFn(Protocol):
|
|
39
|
+
"""Protocol for batch evaluation of multiple (candidate, batch) pairs."""
|
|
40
|
+
|
|
41
|
+
def __call__(
|
|
42
|
+
self,
|
|
43
|
+
items: list[tuple[Candidate, list]],
|
|
44
|
+
) -> list["EvaluationBatch"]: ...
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class ProposalFn(Protocol):
|
|
48
|
+
def __call__(
|
|
49
|
+
self,
|
|
50
|
+
candidate: dict[str, str],
|
|
51
|
+
reflective_dataset: Mapping[str, Sequence[Mapping[str, Any]]],
|
|
52
|
+
components_to_update: list[str],
|
|
53
|
+
) -> dict[str, str]:
|
|
54
|
+
"""
|
|
55
|
+
- Given the current `candidate`, a reflective dataset (as returned by
|
|
56
|
+
`GEPAAdapter.make_reflective_dataset`), and a list of component names to update,
|
|
57
|
+
return a mapping component_name -> new component text (str). This allows the user
|
|
58
|
+
to implement their own instruction proposal logic. For example, the user can use
|
|
59
|
+
a different LLM, implement DSPy signatures, etc. Another example can be situations
|
|
60
|
+
where 2 or more components need to be updated together (coupled updates).
|
|
61
|
+
|
|
62
|
+
Returns
|
|
63
|
+
- Dict[str, str] mapping component names to newly proposed component texts.
|
|
64
|
+
"""
|
|
65
|
+
...
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
class GEPAAdapter(Protocol[DataInst, Trajectory, RolloutOutput]):
|
|
69
|
+
"""
|
|
70
|
+
GEPAAdapter is the single integration point between your system
|
|
71
|
+
and the GEPA optimization engine. Implementers provide three responsibilities:
|
|
72
|
+
|
|
73
|
+
The following are user-defined types that are not interpreted by GEPA but are used by the user's code
|
|
74
|
+
to define the adapter:
|
|
75
|
+
DataInst: User-defined type of input data to the program under optimization.
|
|
76
|
+
Trajectory: User-defined type of trajectory data, which typically captures the
|
|
77
|
+
different steps of the program candidate execution.
|
|
78
|
+
RolloutOutput: User-defined type of output data from the program candidate.
|
|
79
|
+
|
|
80
|
+
The following are the responsibilities of the adapter:
|
|
81
|
+
1) Program construction and evaluation (evaluate):
|
|
82
|
+
Given a batch of DataInst and a "candidate" program (mapping from named components
|
|
83
|
+
-> component text), execute the program to produce per-example scores and
|
|
84
|
+
optionally rich trajectories (capturing intermediate states) needed for reflection.
|
|
85
|
+
|
|
86
|
+
2) Reflective dataset construction (make_reflective_dataset):
|
|
87
|
+
Given the candidate, EvaluationBatch (trajectories, outputs, scores), and the list of components to update,
|
|
88
|
+
produce a small JSON-serializable dataset for each component that you want to update. This
|
|
89
|
+
dataset is fed to the teacher LM to propose improved component text.
|
|
90
|
+
|
|
91
|
+
3) Optional instruction proposal (propose_new_texts):
|
|
92
|
+
GEPA provides a default implementation (instruction_proposal.py) that serializes the reflective dataset
|
|
93
|
+
to propose new component texts. However, users can implement their own proposal logic by implementing this method.
|
|
94
|
+
This method receives the current candidate, the reflective dataset, and the list of components to update,
|
|
95
|
+
and returns a mapping from component name to new component text.
|
|
96
|
+
|
|
97
|
+
4) Optional adapter state persistence (get_adapter_state / set_adapter_state):
|
|
98
|
+
Adapters that need to persist state across checkpoint save/load/resume
|
|
99
|
+
boundaries can implement two optional methods:
|
|
100
|
+
|
|
101
|
+
- ``get_adapter_state() -> dict[str, Any]``: return a fresh dict of
|
|
102
|
+
adapter-specific state to be snapshotted into the checkpoint. Must
|
|
103
|
+
return a **new dict** (not a reference to internal state) to avoid
|
|
104
|
+
mutations between snapshot and save.
|
|
105
|
+
- ``set_adapter_state(state: dict[str, Any]) -> None``: restore
|
|
106
|
+
previously persisted state into the adapter (called on resume).
|
|
107
|
+
|
|
108
|
+
Adapters that do not implement these methods are unaffected — the
|
|
109
|
+
engine detects their absence via duck typing and skips the calls.
|
|
110
|
+
|
|
111
|
+
Key concepts and contracts:
|
|
112
|
+
- candidate: Dict[str, str] mapping a named component of the system to its corresponding text.
|
|
113
|
+
- scores: higher is better. GEPA uses:
|
|
114
|
+
- minibatch: sum(scores) to compare old vs. new candidate (acceptance test),
|
|
115
|
+
- full valset: mean(scores) for tracking and Pareto-front selection.
|
|
116
|
+
Ensure your metric is calibrated accordingly or normalized to a consistent scale.
|
|
117
|
+
- trajectories: opaque to GEPA (the engine never inspects them). They must be
|
|
118
|
+
consumable by your own make_reflective_dataset implementation to extract the
|
|
119
|
+
minimal context needed to produce meaningful feedback for every component of
|
|
120
|
+
the system under optimization.
|
|
121
|
+
- error handling: Never raise for individual example failures. Instead:
|
|
122
|
+
- Return a valid `EvaluationBatch` with per-example failure scores (e.g., 0.0)
|
|
123
|
+
when formatting/parsing fails. Even better if the trajectories are also populated
|
|
124
|
+
with the failed example, including the error message, identifying the reason for the failure.
|
|
125
|
+
- Reserve exceptions for unrecoverable, systemic failures (e.g., missing model,
|
|
126
|
+
misconfigured program, schema mismatch).
|
|
127
|
+
- If an exception is raised, the engine will log the error and proceed to the next iteration.
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
def evaluate(
|
|
131
|
+
self,
|
|
132
|
+
batch: list[DataInst],
|
|
133
|
+
candidate: dict[str, str],
|
|
134
|
+
capture_traces: bool = False,
|
|
135
|
+
) -> EvaluationBatch[Trajectory, RolloutOutput]:
|
|
136
|
+
"""
|
|
137
|
+
Run the program defined by `candidate` on a batch of data.
|
|
138
|
+
|
|
139
|
+
Parameters
|
|
140
|
+
- batch: list of task-specific inputs (DataInst).
|
|
141
|
+
- candidate: mapping from component name -> component text. You must instantiate
|
|
142
|
+
your full system with the component text for each component, and execute it on the batch.
|
|
143
|
+
- capture_traces: when True, you must populate `EvaluationBatch.trajectories`
|
|
144
|
+
with a per-example trajectory object that your `make_reflective_dataset` can
|
|
145
|
+
later consume. When False, you may set trajectories=None to save time/memory.
|
|
146
|
+
capture_traces=True is used by the reflective mutation proposer to build a reflective dataset.
|
|
147
|
+
|
|
148
|
+
Returns
|
|
149
|
+
- EvaluationBatch with:
|
|
150
|
+
- outputs: raw per-example outputs (opaque to GEPA).
|
|
151
|
+
- scores: per-example floats, length == len(batch). Higher is better.
|
|
152
|
+
- trajectories:
|
|
153
|
+
- if capture_traces=True: list[Trajectory] with length == len(batch).
|
|
154
|
+
- if capture_traces=False: None.
|
|
155
|
+
|
|
156
|
+
Scoring semantics
|
|
157
|
+
- The engine uses sum(scores) on minibatches to decide whether to accept a
|
|
158
|
+
candidate mutation and average(scores) over the full valset for tracking.
|
|
159
|
+
- Prefer to return per-example scores, that can be aggregated via summation.
|
|
160
|
+
- If an example fails (e.g., parse error), use a fallback score (e.g., 0.0).
|
|
161
|
+
|
|
162
|
+
Correctness constraints
|
|
163
|
+
- len(outputs) == len(scores) == len(batch)
|
|
164
|
+
- If capture_traces=True: trajectories must be provided and len(trajectories) == len(batch)
|
|
165
|
+
- Do not mutate `batch` or `candidate` in-place. Construct a fresh program
|
|
166
|
+
instance or deep-copy as needed.
|
|
167
|
+
"""
|
|
168
|
+
...
|
|
169
|
+
|
|
170
|
+
def make_reflective_dataset(
|
|
171
|
+
self,
|
|
172
|
+
candidate: dict[str, str],
|
|
173
|
+
eval_batch: EvaluationBatch[Trajectory, RolloutOutput],
|
|
174
|
+
components_to_update: list[str],
|
|
175
|
+
) -> Mapping[str, Sequence[Mapping[str, Any]]]:
|
|
176
|
+
"""
|
|
177
|
+
Build a small, JSON-serializable dataset (per component) to drive instruction
|
|
178
|
+
refinement by a teacher LLM.
|
|
179
|
+
|
|
180
|
+
Parameters
|
|
181
|
+
- candidate: the same candidate evaluated in evaluate().
|
|
182
|
+
- eval_batch: The result of evaluate(..., capture_traces=True) on
|
|
183
|
+
the same batch. You should extract everything you need from eval_batch.trajectories
|
|
184
|
+
(and optionally outputs/scores) to assemble concise, high-signal examples.
|
|
185
|
+
- components_to_update: subset of component names for which the proposer has
|
|
186
|
+
requested updates. At a time, GEPA identifies a subset of components to update.
|
|
187
|
+
|
|
188
|
+
Returns
|
|
189
|
+
- A dict: component_name -> list of dict records (the "reflective dataset").
|
|
190
|
+
Each record should be JSON-serializable and is passed verbatim to the
|
|
191
|
+
instruction proposal prompt. A recommended schema is:
|
|
192
|
+
{
|
|
193
|
+
"Inputs": Dict[str, str], # Minimal, clean view of the inputs to the component
|
|
194
|
+
"Generated Outputs": Dict[str, str] | str, # Model outputs or raw text
|
|
195
|
+
"Feedback": str # Feedback on the component's performance, including correct answer, error messages, etc.
|
|
196
|
+
}
|
|
197
|
+
You may include additional keys (e.g., "score", "rationale", "trace_id") if useful.
|
|
198
|
+
|
|
199
|
+
Determinism
|
|
200
|
+
- If you subsample trace instances, use a seeded RNG to keep runs reproducible.
|
|
201
|
+
"""
|
|
202
|
+
...
|
|
203
|
+
|
|
204
|
+
propose_new_texts: ProposalFn | None = None
|
|
205
|
+
|
|
206
|
+
# Optional: adapters can implement batch_evaluate to evaluate multiple
|
|
207
|
+
# (candidate, batch) pairs in a single call. When not present, the
|
|
208
|
+
# proposer falls back to default_batch_evaluate() which calls evaluate()
|
|
209
|
+
# sequentially. Unlike evaluate(), batch_evaluate always returns full
|
|
210
|
+
# results including trajectories.
|
|
211
|
+
#
|
|
212
|
+
# def batch_evaluate(
|
|
213
|
+
# self, items: list[tuple[Candidate, list[DataInst]]],
|
|
214
|
+
# ) -> list[EvaluationBatch[Trajectory, RolloutOutput]]: ...
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
def default_batch_evaluate(
|
|
218
|
+
adapter: GEPAAdapter,
|
|
219
|
+
items: list[tuple[Candidate, list]],
|
|
220
|
+
) -> list[EvaluationBatch]:
|
|
221
|
+
"""Default sequential batch_evaluate fallback.
|
|
222
|
+
|
|
223
|
+
Calls ``adapter.evaluate()`` once per (candidate, batch) pair with
|
|
224
|
+
``capture_traces=True``. Adapters can implement ``batch_evaluate``
|
|
225
|
+
directly for true batching or parallelism.
|
|
226
|
+
"""
|
|
227
|
+
return [adapter.evaluate(batch, candidate, capture_traces=True) for candidate, batch in items]
|