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
|
@@ -12,6 +12,34 @@ from typing import Any
|
|
|
12
12
|
from .optimizer import DatasetRow, PromptContext
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def _instruction_set_from_wire(value: Any) -> dict[str, Any] | None:
|
|
16
|
+
if not isinstance(value, dict):
|
|
17
|
+
return None
|
|
18
|
+
model_config = value.get("modelConfig")
|
|
19
|
+
components = value.get("components")
|
|
20
|
+
if not isinstance(model_config, dict) or not isinstance(components, dict):
|
|
21
|
+
return None
|
|
22
|
+
normalized_components: dict[str, Any] = {}
|
|
23
|
+
for key, component in components.items():
|
|
24
|
+
if isinstance(component, str):
|
|
25
|
+
normalized_components[key] = component
|
|
26
|
+
elif isinstance(component, dict):
|
|
27
|
+
normalized_components[key] = dict(component)
|
|
28
|
+
else:
|
|
29
|
+
return None
|
|
30
|
+
return {
|
|
31
|
+
"name": value.get("name"),
|
|
32
|
+
"model_config": model_config,
|
|
33
|
+
"shape": value.get("shape"),
|
|
34
|
+
"profile_version_id": value.get("profileVersionId"),
|
|
35
|
+
"model_config_settings_version_id": value.get("modelConfigSettingsVersionId"),
|
|
36
|
+
"version_number": value.get("versionNumber"),
|
|
37
|
+
"prompt_component_key": value.get("promptComponentKey"),
|
|
38
|
+
"components": normalized_components,
|
|
39
|
+
"pinned_components": value.get("pinnedComponents") or {},
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
15
43
|
def _format_number(value: Any) -> str | None:
|
|
16
44
|
if isinstance(value, bool):
|
|
17
45
|
return None
|
|
@@ -102,18 +130,25 @@ class OrizuClient:
|
|
|
102
130
|
*,
|
|
103
131
|
project: str,
|
|
104
132
|
optimizer_version_id: str,
|
|
105
|
-
prompt_version_id: str,
|
|
133
|
+
prompt_version_id: str | None,
|
|
134
|
+
prompt_version_ids: list[str] | None = None,
|
|
135
|
+
instruction_set_profile_version_id: str | None = None,
|
|
106
136
|
scorer_version_id: str,
|
|
107
137
|
dataset_version_id: str,
|
|
108
138
|
split_set_id: str,
|
|
109
139
|
train_split: str,
|
|
110
140
|
validation_split: str,
|
|
141
|
+
model_config_settings_version_id: str | None = None,
|
|
111
142
|
metadata: dict[str, Any] | None = None,
|
|
112
143
|
) -> str:
|
|
113
144
|
query = urllib.parse.urlencode({"project": project})
|
|
145
|
+
input_prompt_version_ids = sorted(set(prompt_version_ids or ([prompt_version_id] if prompt_version_id else [])))
|
|
146
|
+
if not input_prompt_version_ids and not instruction_set_profile_version_id:
|
|
147
|
+
raise RuntimeError("optimization run requires at least one prompt version id")
|
|
114
148
|
data = self._request("POST", f"/api/cli/optimization-runs?{query}", {
|
|
115
149
|
"optimizerVersionId": optimizer_version_id,
|
|
116
|
-
"promptVersionIds":
|
|
150
|
+
"promptVersionIds": input_prompt_version_ids,
|
|
151
|
+
**({"instructionSetProfileVersionId": instruction_set_profile_version_id} if instruction_set_profile_version_id else {}),
|
|
117
152
|
"scorers": [
|
|
118
153
|
{
|
|
119
154
|
"scorerVersionId": scorer_version_id,
|
|
@@ -129,25 +164,31 @@ class OrizuClient:
|
|
|
129
164
|
"trainSplitName": train_split,
|
|
130
165
|
"validationSplitName": validation_split,
|
|
131
166
|
"metadata": metadata or {},
|
|
167
|
+
**({"modelConfigSettingsVersionId": model_config_settings_version_id} if model_config_settings_version_id else {}),
|
|
132
168
|
})
|
|
133
169
|
return data["optimization_run_id"]
|
|
134
170
|
|
|
135
171
|
def fetch_exec_context(
|
|
136
172
|
self,
|
|
137
173
|
*,
|
|
138
|
-
prompt_version_id: str,
|
|
174
|
+
prompt_version_id: str | None,
|
|
139
175
|
runner_version_id: str,
|
|
140
176
|
dataset_version_id: str,
|
|
141
177
|
split_set_id: str,
|
|
142
178
|
split: str,
|
|
179
|
+
instruction_set_profile_version_id: str | None = None,
|
|
143
180
|
) -> tuple[PromptContext, list[DatasetRow]]:
|
|
144
|
-
|
|
145
|
-
"promptVersion": prompt_version_id,
|
|
181
|
+
params = {
|
|
146
182
|
"runnerVersion": runner_version_id,
|
|
147
183
|
"datasetVersion": dataset_version_id,
|
|
148
184
|
"splitSet": split_set_id,
|
|
149
185
|
"split": split,
|
|
150
|
-
}
|
|
186
|
+
}
|
|
187
|
+
if prompt_version_id:
|
|
188
|
+
params["promptVersion"] = prompt_version_id
|
|
189
|
+
query = urllib.parse.urlencode(params)
|
|
190
|
+
if instruction_set_profile_version_id:
|
|
191
|
+
query = f"{query}&" + urllib.parse.urlencode({"instructionSetProfileVersionId": instruction_set_profile_version_id})
|
|
151
192
|
data = self._request("GET", f"/api/cli/runners/exec-context?{query}")
|
|
152
193
|
prompt = data["prompt"]
|
|
153
194
|
rows = [
|
|
@@ -158,9 +199,11 @@ class OrizuClient:
|
|
|
158
199
|
body=prompt.get("body"),
|
|
159
200
|
body_kind=prompt.get("bodyKind") or "text",
|
|
160
201
|
provider_settings=prompt.get("providerSettings") or {},
|
|
161
|
-
prompt_version_id=prompt
|
|
202
|
+
prompt_version_id=prompt.get("promptVersionId"),
|
|
162
203
|
runner_version_id=prompt["runnerVersionId"],
|
|
163
204
|
prompt_id=prompt.get("promptId"),
|
|
205
|
+
instruction_set=_instruction_set_from_wire(data.get("instructionSet")),
|
|
206
|
+
body_present="body" in prompt,
|
|
164
207
|
), rows
|
|
165
208
|
|
|
166
209
|
def fetch_scorer_exec_context(
|
|
@@ -200,6 +243,8 @@ class OrizuClient:
|
|
|
200
243
|
prompt_version_id=prompt["promptVersionId"],
|
|
201
244
|
runner_version_id=prompt["runnerVersionId"],
|
|
202
245
|
prompt_id=prompt.get("promptId"),
|
|
246
|
+
instruction_set=_instruction_set_from_wire(data.get("instructionSet")),
|
|
247
|
+
body_present="body" in prompt,
|
|
203
248
|
# The request may use a legacy prompt-version alias. Persist and
|
|
204
249
|
# submit the canonical executable scorer version returned by the
|
|
205
250
|
# server so optimization runs never mix the two ID namespaces.
|
|
@@ -70,6 +70,17 @@ class LocalOptimizationLogger:
|
|
|
70
70
|
def append_event(self, event: dict[str, Any]) -> None:
|
|
71
71
|
_append_jsonl(self.directory / "events.jsonl", event)
|
|
72
72
|
|
|
73
|
+
def write_preflight(self, *, project: str, verdict: dict[str, Any], kind: str = "preflight_refusal") -> Path:
|
|
74
|
+
"""Write a preflight verdict before or alongside the optimization event stream."""
|
|
75
|
+
path = self.directory / "preflight.json"
|
|
76
|
+
_write_json(path, {
|
|
77
|
+
"schema_version": "orizu.optimization-preflight.v1",
|
|
78
|
+
"kind": kind,
|
|
79
|
+
"project": project,
|
|
80
|
+
"verdict": verdict,
|
|
81
|
+
})
|
|
82
|
+
return path
|
|
83
|
+
|
|
73
84
|
def append_evaluations(
|
|
74
85
|
self,
|
|
75
86
|
*,
|
|
@@ -111,6 +122,47 @@ class LocalOptimizationLogger:
|
|
|
111
122
|
"candidate_text": candidate_text,
|
|
112
123
|
})
|
|
113
124
|
|
|
125
|
+
def append_reflection_failure(
|
|
126
|
+
self,
|
|
127
|
+
*,
|
|
128
|
+
iteration: int | None,
|
|
129
|
+
parent_candidate_id: str | None,
|
|
130
|
+
row_ids: list[str],
|
|
131
|
+
error_type: str,
|
|
132
|
+
error_message: str,
|
|
133
|
+
gepa_prompt_chars: int,
|
|
134
|
+
parent_text_chars: int,
|
|
135
|
+
parent_result_count: int,
|
|
136
|
+
parent_context_chars: int,
|
|
137
|
+
) -> None:
|
|
138
|
+
"""Persist a GEPA-swallowed reflection exception in the shared ledger."""
|
|
139
|
+
_append_jsonl(self.directory / "reflections.jsonl", {
|
|
140
|
+
"status": "failed",
|
|
141
|
+
"iteration": iteration,
|
|
142
|
+
"parent_candidate_id": parent_candidate_id,
|
|
143
|
+
"child_candidate_id": None,
|
|
144
|
+
"row_ids": row_ids,
|
|
145
|
+
"error_type": error_type,
|
|
146
|
+
"error_message": error_message,
|
|
147
|
+
"gepa_prompt_chars": gepa_prompt_chars,
|
|
148
|
+
"parent_text_chars": parent_text_chars,
|
|
149
|
+
"parent_result_count": parent_result_count,
|
|
150
|
+
"parent_context_chars": parent_context_chars,
|
|
151
|
+
})
|
|
152
|
+
|
|
153
|
+
def write_lm_stats(
|
|
154
|
+
self, *, total_cost: float, total_tokens_in: int, total_tokens_out: int, total_tokens: int,
|
|
155
|
+
) -> None:
|
|
156
|
+
"""Record connector reflection usage in the local run's stable JSON form."""
|
|
157
|
+
_write_json(self.directory / "lm_stats.json", {
|
|
158
|
+
"reflection": {
|
|
159
|
+
"total_cost": total_cost,
|
|
160
|
+
"total_tokens_in": total_tokens_in,
|
|
161
|
+
"total_tokens_out": total_tokens_out,
|
|
162
|
+
"total_tokens": total_tokens,
|
|
163
|
+
},
|
|
164
|
+
})
|
|
165
|
+
|
|
114
166
|
def write_result(self, result: TextGepaResult) -> None:
|
|
115
167
|
_write_json(self.directory / "result.json", {
|
|
116
168
|
"optimization_run_id": result.run_id,
|
|
@@ -81,12 +81,14 @@ class PromptContext:
|
|
|
81
81
|
body: str | None
|
|
82
82
|
body_kind: str
|
|
83
83
|
provider_settings: dict[str, Any]
|
|
84
|
-
prompt_version_id: str
|
|
84
|
+
prompt_version_id: str | None
|
|
85
85
|
runner_version_id: str
|
|
86
86
|
prompt_id: str | None = None
|
|
87
87
|
scorer_version_id: str | None = None
|
|
88
88
|
metric_key: str | None = None
|
|
89
89
|
higher_is_better: bool = True
|
|
90
|
+
instruction_set: dict[str, Any] | None = None
|
|
91
|
+
body_present: bool = True
|
|
90
92
|
|
|
91
93
|
|
|
92
94
|
@dataclass(frozen=True)
|
|
@@ -145,6 +147,9 @@ class ReflectionResult:
|
|
|
145
147
|
prompt: str
|
|
146
148
|
response: str
|
|
147
149
|
candidate_text: str
|
|
150
|
+
usage: dict[str, int] | None = None
|
|
151
|
+
request_id: str | None = None
|
|
152
|
+
latency_ms: float | None = None
|
|
148
153
|
|
|
149
154
|
|
|
150
155
|
class RetryableReflectionError(RuntimeError):
|
|
@@ -520,7 +525,7 @@ class TextGepaConfig:
|
|
|
520
525
|
class TextGepaResult:
|
|
521
526
|
run_id: str
|
|
522
527
|
best_candidate_id: str
|
|
523
|
-
best_candidate_text: str
|
|
528
|
+
best_candidate_text: str | dict[str, str]
|
|
524
529
|
best_score: float
|
|
525
530
|
seed_score: float
|
|
526
531
|
promoted_prompt_version_id: str | None
|
|
@@ -568,7 +573,7 @@ class EventSink(Protocol):
|
|
|
568
573
|
...
|
|
569
574
|
|
|
570
575
|
|
|
571
|
-
CandidateRunner = Callable[[str, DatasetRow, PromptContext, str], RunnerCallResult]
|
|
576
|
+
CandidateRunner = Callable[[str | dict[str, str], DatasetRow, PromptContext, str], RunnerCallResult]
|
|
572
577
|
ScorerRunner = Callable[[DatasetRow, RunnerCallResult, PromptContext, str], RunnerCallResult]
|
|
573
578
|
Reflector = Callable[[str, list[RowEvaluation], TextGepaConfig], ReflectionResult]
|
|
574
579
|
|
|
@@ -887,7 +892,7 @@ class EvaluationCache:
|
|
|
887
892
|
def key(
|
|
888
893
|
self,
|
|
889
894
|
*,
|
|
890
|
-
candidate_text: str,
|
|
895
|
+
candidate_text: str | dict[str, str],
|
|
891
896
|
row: DatasetRow,
|
|
892
897
|
split: str,
|
|
893
898
|
prompt_context: PromptContext,
|
|
@@ -1106,7 +1111,7 @@ def _candidate_id(iteration: int, text: str) -> str:
|
|
|
1106
1111
|
|
|
1107
1112
|
def evaluate_candidate(
|
|
1108
1113
|
*,
|
|
1109
|
-
candidate_text: str,
|
|
1114
|
+
candidate_text: str | dict[str, str],
|
|
1110
1115
|
candidate_id: str,
|
|
1111
1116
|
rows: list[DatasetRow],
|
|
1112
1117
|
split: str,
|