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,55 @@
|
|
|
1
|
+
import { authedFetch } from './http.js'
|
|
2
|
+
import { parseJsonResponse, sanitizeTerminalText } from './json-response.js'
|
|
3
|
+
|
|
4
|
+
interface PromptLabelCliContext {
|
|
5
|
+
getArg: (name: string) => string | null
|
|
6
|
+
getPositionalArg: (index: number) => string | null
|
|
7
|
+
json: boolean
|
|
8
|
+
printJson: (value: Record<string, unknown>) => void
|
|
9
|
+
printLine: (value: string) => void
|
|
10
|
+
resolveProjectSlug: (project: string | null) => Promise<string>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface PromptLabelResponse {
|
|
14
|
+
prompt_id: string
|
|
15
|
+
prompt_version_id: string
|
|
16
|
+
label: string
|
|
17
|
+
owner?: {
|
|
18
|
+
instructionSetSlug: string
|
|
19
|
+
componentKey: string
|
|
20
|
+
} | null
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export async function setPromptLabel(context: PromptLabelCliContext): Promise<void> {
|
|
24
|
+
const promptName = context.getPositionalArg(3)
|
|
25
|
+
const label = context.getPositionalArg(4)
|
|
26
|
+
const project = context.getArg('--project') || await context.resolveProjectSlug(null)
|
|
27
|
+
const promptVersionId = context.getArg('--version')
|
|
28
|
+
|
|
29
|
+
if (!promptName || !label || !promptVersionId) {
|
|
30
|
+
throw new Error('Usage: orizu prompts labels set <prompt-name> <label> --version <prompt-version-id> [--project <team/project>] [--json]')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const response = await authedFetch(`/api/cli/prompts/labels?project=${encodeURIComponent(project)}`, {
|
|
34
|
+
method: 'POST',
|
|
35
|
+
headers: { 'Content-Type': 'application/json' },
|
|
36
|
+
body: JSON.stringify({ promptName, label, promptVersionId }),
|
|
37
|
+
})
|
|
38
|
+
if (!response.ok) {
|
|
39
|
+
throw new Error(`Failed to set prompt label: ${await response.text()}`)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const data = await parseJsonResponse<PromptLabelResponse>(response, 'Prompt label set')
|
|
43
|
+
if (context.json) {
|
|
44
|
+
context.printJson(data as unknown as Record<string, unknown>)
|
|
45
|
+
return
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
context.printLine(`Moved ${sanitizeTerminalText(label)} to ${sanitizeTerminalText(promptVersionId)}`)
|
|
49
|
+
if (data.owner) {
|
|
50
|
+
context.printLine(
|
|
51
|
+
`Owner: ${sanitizeTerminalText(promptName)} (${sanitizeTerminalText(data.prompt_id)}) -> ` +
|
|
52
|
+
`${sanitizeTerminalText(data.owner.instructionSetSlug)} / ${sanitizeTerminalText(data.owner.componentKey)}`
|
|
53
|
+
)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -56,9 +56,9 @@ export function formatFiniteLengthCount(
|
|
|
56
56
|
signed = false
|
|
57
57
|
): string | null {
|
|
58
58
|
if (typeof value !== 'number' || !Number.isFinite(value)) return null
|
|
59
|
+
if (!signed) return value.toLocaleString('en-US')
|
|
59
60
|
|
|
60
61
|
const formatted = Math.abs(value).toLocaleString('en-US')
|
|
61
|
-
if (!signed) return formatted
|
|
62
62
|
if (value > 0) return `+${formatted}`
|
|
63
63
|
if (value < 0) return `-${formatted}`
|
|
64
64
|
return formatted
|
package/src/prompt-report-cli.ts
CHANGED
|
@@ -59,7 +59,7 @@ export async function promptReportCommand(
|
|
|
59
59
|
|
|
60
60
|
if (!prompt) {
|
|
61
61
|
throw new Error(
|
|
62
|
-
'Usage: orizu prompts report set --prompt <id-or-name> --project <team/project> ' +
|
|
62
|
+
'Usage: orizu prompts report set --prompt <id-or-name> [--project <team/project>] ' +
|
|
63
63
|
'(--version <n> | --version-id <id>) ' +
|
|
64
64
|
'(--report <markdown|@file> | --report-file <path>) [--json]'
|
|
65
65
|
)
|
|
@@ -74,7 +74,7 @@ export async function promptReportCommand(
|
|
|
74
74
|
const report = readMarkdownReportInput(args, 'Prompt')
|
|
75
75
|
if (!report) {
|
|
76
76
|
throw new Error(
|
|
77
|
-
'Usage: orizu prompts report set --prompt <id-or-name> --project <team/project> ' +
|
|
77
|
+
'Usage: orizu prompts report set --prompt <id-or-name> [--project <team/project>] ' +
|
|
78
78
|
'(--version <n> | --version-id <id>) ' +
|
|
79
79
|
'(--report <markdown|@file> | --report-file <path>) [--json]'
|
|
80
80
|
)
|
|
@@ -10,6 +10,10 @@ interface PromptSummaryRow {
|
|
|
10
10
|
role: string
|
|
11
11
|
status?: string
|
|
12
12
|
lengthStats?: CliLengthStats | null
|
|
13
|
+
owner?: {
|
|
14
|
+
instructionSetSlug: string
|
|
15
|
+
componentKey: string
|
|
16
|
+
} | null
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
export function printPromptSummaryTable(
|
|
@@ -54,4 +58,12 @@ export function printPromptSummaryTable(
|
|
|
54
58
|
rows.forEach(row => {
|
|
55
59
|
printLine(keys.map((key, index) => row[key].padEnd(widths[index])).join(' '))
|
|
56
60
|
})
|
|
61
|
+
items.forEach(item => {
|
|
62
|
+
if (item.owner) {
|
|
63
|
+
printLine(
|
|
64
|
+
`Owner: ${sanitizeTerminalText(item.name)} (${sanitizeTerminalText(item.id)}) -> ` +
|
|
65
|
+
`${sanitizeTerminalText(item.owner.instructionSetSlug)} / ${sanitizeTerminalText(item.owner.componentKey)}`
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
})
|
|
57
69
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// JavaScript's \s is broader than the database locale's POSIX [:space:]
|
|
2
|
+
// predicate. These four code points are content in the measured PostgreSQL
|
|
3
|
+
// boundary, so retain them explicitly when validating CLI report input.
|
|
4
|
+
export function hasCanonicalReportMarkdownContent(markdown: string): boolean {
|
|
5
|
+
return /(?:[^\s]|[\u00a0\u2007\u202f\ufeff])/u.test(markdown)
|
|
6
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ALI-1452: a shared, human-readable warning for a replaced prompt-version
|
|
3
|
+
* report on a push/draft response.
|
|
4
|
+
*
|
|
5
|
+
* Re-pushing an unchanged prompt with a report deliberately replaces the
|
|
6
|
+
* version's existing report (reports are correctable; versions are immutable).
|
|
7
|
+
* The server discloses that replacement as `report_replaced:
|
|
8
|
+
* { source_name, updated_at } | null`; this turns a non-null disclosure into
|
|
9
|
+
* the stderr warning line the push commands print. JSON mode prints nothing —
|
|
10
|
+
* the payload already carries `report_replaced`.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
14
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* A one-line warning when a push response discloses that it replaced an
|
|
19
|
+
* existing report, or null when nothing was replaced (or no report was sent).
|
|
20
|
+
*/
|
|
21
|
+
export function reportReplacementWarning(data: Record<string, unknown>): string | null {
|
|
22
|
+
const replaced = data.report_replaced
|
|
23
|
+
if (!isRecord(replaced)) return null
|
|
24
|
+
|
|
25
|
+
const sourceName = typeof replaced.source_name === 'string'
|
|
26
|
+
? replaced.source_name
|
|
27
|
+
: 'unknown source'
|
|
28
|
+
const updatedAt = typeof replaced.updated_at === 'string'
|
|
29
|
+
? replaced.updated_at
|
|
30
|
+
: 'unknown time'
|
|
31
|
+
return (
|
|
32
|
+
'Warning: replaced the existing report for this version ' +
|
|
33
|
+
`(${sourceName}, last updated ${updatedAt})`
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { type SyncComponent, type SyncSet } from './instruction-sets-cli.js'
|
|
2
|
+
|
|
3
|
+
export interface RunnerInstructionSet {
|
|
4
|
+
name: string
|
|
5
|
+
modelConfig: Record<string, unknown>
|
|
6
|
+
shape: string[]
|
|
7
|
+
profileVersionId: string
|
|
8
|
+
modelConfigSettingsVersionId?: string
|
|
9
|
+
versionNumber: number
|
|
10
|
+
promptComponentKey?: string
|
|
11
|
+
components: Record<string, string>
|
|
12
|
+
pinnedComponents?: Record<string, { repoPath: string; contentSha: string; commitSha: string }>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function runnerInstructionSetSyncSet(instructionSet: RunnerInstructionSet): SyncSet {
|
|
16
|
+
const modelConfigIdentity = typeof instructionSet.modelConfig.identity === 'string'
|
|
17
|
+
? instructionSet.modelConfig.identity
|
|
18
|
+
: ''
|
|
19
|
+
if (!modelConfigIdentity) throw new Error('Runner exec context instruction set has no model config identity')
|
|
20
|
+
const missingKey = instructionSet.shape.find(key => !(key in instructionSet.components) && !(key in (instructionSet.pinnedComponents || {})))
|
|
21
|
+
if (missingKey) throw new Error('instruction_set_tuple_incomplete')
|
|
22
|
+
const components: Record<string, SyncComponent> = Object.fromEntries(Object.entries(instructionSet.components).map(([key, body]) => [key, { body }]))
|
|
23
|
+
for (const [key, pin] of Object.entries(instructionSet.pinnedComponents || {})) components[key] = pin
|
|
24
|
+
const material = {
|
|
25
|
+
profileVersionId: instructionSet.profileVersionId,
|
|
26
|
+
versionNumber: instructionSet.versionNumber,
|
|
27
|
+
modelConfigIdentity,
|
|
28
|
+
// syncToDisk's long-lived manifest requires provenance; this execution
|
|
29
|
+
// path has no resolver decision to expose, only an exact profile version.
|
|
30
|
+
resolvedFrom: 'exact_profile_version',
|
|
31
|
+
components,
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
name: instructionSet.name,
|
|
35
|
+
shape: instructionSet.shape,
|
|
36
|
+
default: material,
|
|
37
|
+
profiles: [{ modelConfigIdentity, resolvedFrom: 'exact_profile_version', production: material }],
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function runnerInputPrompt(
|
|
42
|
+
promptContext: { body?: string | null; bodyKind: string; providerSettings: Record<string, unknown> }
|
|
43
|
+
): Record<string, unknown> {
|
|
44
|
+
const prompt = {
|
|
45
|
+
body_kind: promptContext.bodyKind,
|
|
46
|
+
provider_settings: promptContext.providerSettings,
|
|
47
|
+
} as Record<string, unknown>
|
|
48
|
+
// The route owns this decision. Preserve its response shape exactly so an
|
|
49
|
+
// implicit wrapped prompt remains compatible with existing runners.
|
|
50
|
+
if ('body' in promptContext) prompt.body = promptContext.body
|
|
51
|
+
return prompt
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function runnerInputInstructionSet(instructionSet: RunnerInstructionSet): Record<string, unknown> {
|
|
55
|
+
return {
|
|
56
|
+
name: instructionSet.name,
|
|
57
|
+
model_config: instructionSet.modelConfig,
|
|
58
|
+
shape: instructionSet.shape,
|
|
59
|
+
...(instructionSet.modelConfigSettingsVersionId ? { model_config_settings_version_id: instructionSet.modelConfigSettingsVersionId } : {}),
|
|
60
|
+
...(instructionSet.promptComponentKey ? { prompt_component_key: instructionSet.promptComponentKey } : {}),
|
|
61
|
+
components: instructionSet.components,
|
|
62
|
+
...(Object.keys(instructionSet.pinnedComponents || {}).length > 0 ? { pinned_components: instructionSet.pinnedComponents } : {}),
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `orizu scorers` subcommand router (ALI-1554).
|
|
3
|
+
*
|
|
4
|
+
* The five historical branches lived inline in index.ts; folding them here
|
|
5
|
+
* reclaims the headroom the CLI line ratchet (ALI-976) requires before a new
|
|
6
|
+
* subcommand may be added. Behaviour is unchanged: each handler is the same
|
|
7
|
+
* function index.ts already called, and an unrecognised subcommand returns
|
|
8
|
+
* null so main() still falls through to printUsage().
|
|
9
|
+
*/
|
|
10
|
+
export interface ScorersCommandIo {
|
|
11
|
+
list: () => Promise<void>
|
|
12
|
+
register: () => Promise<void>
|
|
13
|
+
detail: () => Promise<void>
|
|
14
|
+
labelsSet: () => Promise<void>
|
|
15
|
+
exec: () => Promise<void>
|
|
16
|
+
verifyParity: (args: string[]) => Promise<number>
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Returns the process exit code, or null when the subcommand is not ours. */
|
|
20
|
+
export async function scorersCommand(args: string[], io: ScorersCommandIo): Promise<number | null> {
|
|
21
|
+
const subcommand = args[1]
|
|
22
|
+
// A Map, not an object literal: `scorers constructor` must not resolve to
|
|
23
|
+
// an Object.prototype member and be treated as a known subcommand.
|
|
24
|
+
const handlers = new Map<string, () => Promise<void>>([
|
|
25
|
+
['list', io.list], ['register', io.register], ['detail', io.detail], ['exec', io.exec],
|
|
26
|
+
])
|
|
27
|
+
const handler = subcommand === undefined ? undefined : handlers.get(subcommand)
|
|
28
|
+
if (handler) {
|
|
29
|
+
await handler()
|
|
30
|
+
return 0
|
|
31
|
+
}
|
|
32
|
+
if (subcommand === 'labels' && args[2] === 'set') {
|
|
33
|
+
await io.labelsSet()
|
|
34
|
+
return 0
|
|
35
|
+
}
|
|
36
|
+
if (subcommand === 'verify-parity') {
|
|
37
|
+
return io.verifyParity(args.slice(2))
|
|
38
|
+
}
|
|
39
|
+
return null
|
|
40
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The customer-side half of `orizu scorers verify-parity` (ALI-1554).
|
|
3
|
+
*
|
|
4
|
+
* Embedded as a string constant and written to a temp file at run time on
|
|
5
|
+
* purpose: no packaging (`files`/`vendor`) change, so there is nothing for the
|
|
6
|
+
* published tarball to lose. It runs in the CUSTOMER's interpreter and the
|
|
7
|
+
* customer's unscrubbed environment — it is their metric in their process.
|
|
8
|
+
*
|
|
9
|
+
* Contract: reads `{rows: [{row_id, row, model_output}]}` from
|
|
10
|
+
* ORIZU_PARITY_INPUT_PATH, calls `<module>:<function>(row, model_output)` per
|
|
11
|
+
* row, and writes `{scores: [{row_id, score} | {row_id, error}]}` to
|
|
12
|
+
* ORIZU_PARITY_OUTPUT_PATH. Exit 2 (with the reason on stderr) means the check
|
|
13
|
+
* could not run at all; a per-row exception is that row's error, not an abort.
|
|
14
|
+
*/
|
|
15
|
+
export const PARITY_BRIDGE_SOURCE = `import json, math, os, sys, traceback
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def fail(message):
|
|
19
|
+
sys.stderr.write(message + "\\n")
|
|
20
|
+
sys.exit(2)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def last_line(text):
|
|
24
|
+
lines = [line for line in text.strip().splitlines() if line.strip()]
|
|
25
|
+
return lines[-1] if lines else "unknown error"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def extract(value):
|
|
29
|
+
# Mirrors orizu_gepa.optimizer._score_from_scorer, minus the clamp: the
|
|
30
|
+
# CLI clamps both sides so the compared number is what GEPA optimizes.
|
|
31
|
+
# bool is deliberately NOT rejected: measured, _score_from_scorer(extra=
|
|
32
|
+
# {'score': True}) -> (1.0, None) and False -> (0.0, None), because bool is an
|
|
33
|
+
# int subclass and Python's numeric branch accepts it. An exact-match DSPy
|
|
34
|
+
# metric returning True must compare, not error.
|
|
35
|
+
if isinstance(value, (int, float)):
|
|
36
|
+
raw = value
|
|
37
|
+
elif isinstance(value, dict):
|
|
38
|
+
raw = value.get("score")
|
|
39
|
+
if raw is None and isinstance(value.get("model_response"), dict):
|
|
40
|
+
raw = value["model_response"].get("score")
|
|
41
|
+
elif hasattr(value, "score"):
|
|
42
|
+
# official GEPA's EvaluationResult NamedTuple and friends;
|
|
43
|
+
# objective_scores is deliberately ignored.
|
|
44
|
+
raw = value.score
|
|
45
|
+
else:
|
|
46
|
+
raise TypeError("scorer result must be a number, a dict with a numeric 'score', or an object with a numeric .score attribute")
|
|
47
|
+
if isinstance(raw, str):
|
|
48
|
+
raw = float(raw)
|
|
49
|
+
if not isinstance(raw, (int, float)):
|
|
50
|
+
raise TypeError("scorer result must include a numeric score")
|
|
51
|
+
raw = float(raw)
|
|
52
|
+
if not math.isfinite(raw):
|
|
53
|
+
raise ValueError("scorer result score must be finite")
|
|
54
|
+
return raw
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
target = os.environ.get("ORIZU_PARITY_ORIGINAL", "")
|
|
58
|
+
module_name, separator, function_name = target.partition(":")
|
|
59
|
+
if not separator or not module_name or not function_name:
|
|
60
|
+
fail("--original must be <module>:<function> (got %r)" % target)
|
|
61
|
+
|
|
62
|
+
# The customer's metric lives beside the command's cwd, not beside this
|
|
63
|
+
# generated bridge file, so cwd must win over the script directory.
|
|
64
|
+
sys.path.insert(0, os.getcwd())
|
|
65
|
+
try:
|
|
66
|
+
import importlib
|
|
67
|
+
|
|
68
|
+
module = importlib.import_module(module_name)
|
|
69
|
+
except Exception:
|
|
70
|
+
fail("Failed to import original metric module '%s': %s" % (module_name, last_line(traceback.format_exc())))
|
|
71
|
+
|
|
72
|
+
if not hasattr(module, function_name):
|
|
73
|
+
fail("Original metric module '%s' has no attribute '%s'" % (module_name, function_name))
|
|
74
|
+
metric = getattr(module, function_name)
|
|
75
|
+
if not callable(metric):
|
|
76
|
+
fail("Original metric '%s:%s' is not callable" % (module_name, function_name))
|
|
77
|
+
|
|
78
|
+
with open(os.environ["ORIZU_PARITY_INPUT_PATH"], encoding="utf-8") as handle:
|
|
79
|
+
payload = json.load(handle)
|
|
80
|
+
|
|
81
|
+
scores = []
|
|
82
|
+
for item in payload["rows"]:
|
|
83
|
+
try:
|
|
84
|
+
scores.append({"row_id": item["row_id"], "score": extract(metric(item["row"], item["model_output"]))})
|
|
85
|
+
except Exception:
|
|
86
|
+
scores.append({"row_id": item["row_id"], "error": last_line(traceback.format_exc())})
|
|
87
|
+
|
|
88
|
+
with open(os.environ["ORIZU_PARITY_OUTPUT_PATH"], "w", encoding="utf-8") as handle:
|
|
89
|
+
json.dump({"scores": scores}, handle)
|
|
90
|
+
`
|