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
package/dist/help.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export interface CliOptionDoc {
|
|
2
|
+
name: string;
|
|
3
|
+
help: string;
|
|
4
|
+
required?: boolean;
|
|
5
|
+
repeatable?: boolean;
|
|
6
|
+
choices?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface CliCommandDoc {
|
|
9
|
+
path: string[];
|
|
10
|
+
usage: string;
|
|
11
|
+
summary: string;
|
|
12
|
+
group: string;
|
|
13
|
+
aliases?: string[][];
|
|
14
|
+
options?: CliOptionDoc[];
|
|
15
|
+
examples?: string[];
|
|
16
|
+
}
|
|
17
|
+
export declare const COMMAND_DOCS: CliCommandDoc[];
|
|
18
|
+
export declare function findCommandDoc(args: string[]): CliCommandDoc | undefined;
|
|
19
|
+
export declare function commandDocsWithPrefix(args: string[]): CliCommandDoc[];
|
|
20
|
+
export declare function renderRootHelp(): string;
|
|
21
|
+
export declare function renderGroupHelp(args: string[]): string;
|
|
22
|
+
export declare function renderCommandHelp(doc: CliCommandDoc): string;
|
|
23
|
+
export declare function renderHelpForArgs(args: string[]): string;
|
|
24
|
+
export declare function getCapabilities(version: string): {
|
|
25
|
+
name: string;
|
|
26
|
+
version: string;
|
|
27
|
+
globalOptions: {
|
|
28
|
+
name: string;
|
|
29
|
+
help: string;
|
|
30
|
+
}[];
|
|
31
|
+
commands: {
|
|
32
|
+
name: string;
|
|
33
|
+
usage: string;
|
|
34
|
+
help: string;
|
|
35
|
+
group: string;
|
|
36
|
+
aliases: string[];
|
|
37
|
+
params: {
|
|
38
|
+
name: string;
|
|
39
|
+
help: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
repeatable: boolean;
|
|
42
|
+
choices: string[] | undefined;
|
|
43
|
+
}[];
|
|
44
|
+
}[];
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=help.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,EAAE,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAoCD,eAAO,MAAM,YAAY,EAAE,aAAa,EAumCvC,CAAA;AAUD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,GAAG,SAAS,CAMxE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,CAWrE;AAOD,wBAAgB,cAAc,IAAI,MAAM,CA0CvC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAoBtD;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA4B5D;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAgBxD;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;EAoB9C"}
|
package/dist/help.js
CHANGED
|
@@ -11,6 +11,7 @@ const GROUPS = [
|
|
|
11
11
|
{ name: 'Teams', summary: 'Manage teams and team memberships.' },
|
|
12
12
|
{ name: 'Projects', summary: 'Manage projects inside teams.' },
|
|
13
13
|
{ name: 'Prompts and judges', summary: 'Work with versioned prompt and judge artifacts.' },
|
|
14
|
+
{ name: 'Instruction sets', summary: 'Inspect the project-scoped instruction-set control plane.' },
|
|
14
15
|
{ name: 'Report comments', summary: 'Review and mutate anchored report comments across prompt, optimization, and task reports.' },
|
|
15
16
|
{ name: 'Diff comments', summary: 'Export inline comments with recoverable prompt-diff context.' },
|
|
16
17
|
{ name: 'Scorers and runners', summary: 'Register scorers, push runnable artifacts, execute runners, and submit scores.' },
|
|
@@ -25,6 +26,44 @@ const GROUPS = [
|
|
|
25
26
|
{ name: 'Promotion manifests', summary: 'List, inspect, approve, reject, and idempotently apply promotion manifests.' },
|
|
26
27
|
];
|
|
27
28
|
export const COMMAND_DOCS = [
|
|
29
|
+
{ path: ['instructions', 'create'], aliases: [['instruction-sets', 'create']], usage: 'orizu instructions create <manifest> --project <team/project> [--runner-version <id>] [--model-config <identity>] [--json]', summary: 'Create an instruction set from a local manifest.', group: 'Instruction sets', options: [{ name: '--runner-version <id>', help: 'Pin the runner version for component prompt versions.' }, { name: '--model-config <identity>', help: 'Select the default model configuration.' }, { name: '--json', help: 'Print one JSON document.' }], examples: ['orizu instructions create ./orizu.instruction-set.json --project core/evals --model-config anthropic/claude-haiku'] },
|
|
30
|
+
{ path: ['instructions', 'push'], aliases: [['instruction-sets', 'push']], usage: 'orizu instructions push <manifest> --project <team/project> [--set <slug-or-exact-name>] [--runner-version <id>] [--json]', summary: 'Push a new instruction-set profile version.', group: 'Instruction sets', options: [{ name: '--set <slug-or-exact-name>', help: 'Target the stable set handle when it differs from the manifest name.' }, { name: '--runner-version <id>', help: 'Pin the runner version for changed component prompt versions.' }, { name: '--json', help: 'Print one JSON document.' }], examples: ['orizu instructions push ./orizu.instruction-set.json --project core/evals --set planner'] },
|
|
31
|
+
{
|
|
32
|
+
path: ['instructions', 'list'],
|
|
33
|
+
aliases: [['instruction-sets', 'list']],
|
|
34
|
+
usage: 'orizu instructions list [--project <team/project>] [--status active|archived|all] [--json]',
|
|
35
|
+
summary: 'List instruction sets in a project.',
|
|
36
|
+
group: 'Instruction sets',
|
|
37
|
+
options: [{ name: '--project <team/project>', help: 'Project slug (defaults to configured context).' }, { name: '--status <active|archived|all>', help: 'Filter archived instruction sets.' }, { name: '--json', help: 'Print JSON.' }],
|
|
38
|
+
examples: ['orizu instructions list --project core/evals', 'orizu instructions list --status archived --json'],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: ['instructions', 'show'],
|
|
42
|
+
aliases: [['instruction-sets', 'show']],
|
|
43
|
+
usage: 'orizu instructions show <set> [--project <team/project>] [--status active|archived|all] [--json]',
|
|
44
|
+
summary: 'Show an instruction set shape, default, and profile production state.',
|
|
45
|
+
group: 'Instruction sets',
|
|
46
|
+
options: [{ name: '--project <team/project>', help: 'Project slug (defaults to configured context).' }, { name: '--status <active|archived|all>', help: 'Filter archived instruction sets.' }, { name: '--json', help: 'Print JSON.' }],
|
|
47
|
+
examples: ['orizu instructions show research --project core/evals', 'orizu instructions show research --json'],
|
|
48
|
+
},
|
|
49
|
+
{ path: ['instructions', 'profiles', 'new'], aliases: [['instruction-sets', 'profiles', 'new']], usage: 'orizu instructions profiles new <set> --project <team/project> --model-config <identity> [--json]', summary: 'Create a model-config profile seeded from the instruction-set default.', group: 'Instruction sets', options: [{ name: '--model-config <identity>', help: 'Model config identity for the new profile.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions profiles new planner --project core/evals --model-config anthropic/claude-haiku'] },
|
|
50
|
+
{ path: ['instructions', 'profiles', 'promote'], aliases: [['instruction-sets', 'profiles', 'promote']], usage: 'orizu instructions profiles promote <set> --project <team/project> --model-config <identity> --version <n> [--json]', summary: 'Move one profile version to production.', group: 'Instruction sets', options: [{ name: '--model-config <identity>', help: 'Profile model config.', required: true }, { name: '--version <n>', help: 'Profile version to promote.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions profiles promote planner --project core/evals --model-config anthropic/claude-haiku --version 2'] },
|
|
51
|
+
{ path: ['instructions', 'profiles', 'rollback'], aliases: [['instruction-sets', 'profiles', 'rollback']], usage: 'orizu instructions profiles rollback <set> --project <team/project> --model-config <identity> --to <n> [--json]', summary: 'Create a rollback version and move profile production to it.', group: 'Instruction sets', options: [{ name: '--model-config <identity>', help: 'Profile model config.', required: true }, { name: '--to <n>', help: 'Historical profile version to copy.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions profiles rollback planner --project core/evals --model-config anthropic/claude-haiku --to 1'] },
|
|
52
|
+
{ path: ['instructions', 'default', 'show'], aliases: [['instruction-sets', 'default', 'show']], usage: 'orizu instructions default show <set> --project <team/project> [--json]', summary: 'Show the instruction-set default and its resolution impact.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions default show planner --project core/evals'] },
|
|
53
|
+
{ path: ['instructions', 'default', 'move'], aliases: [['instruction-sets', 'default', 'move']], usage: 'orizu instructions default move <set> --project <team/project> --model-config <identity> --version <n> [--json]', summary: 'Move the instruction-set default to a profile version.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--model-config <identity>', help: 'Target model config.', required: true }, { name: '--version <n>', help: 'Target profile version.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions default move planner --project core/evals --model-config anthropic/claude-haiku --version 2'] },
|
|
54
|
+
{ path: ['instructions', 'shape', 'add'], aliases: [['instruction-sets', 'shape', 'add']], usage: 'orizu instructions shape add <set> --project <team/project> --key <key> --from <manifest> [--json]', summary: 'Add one component key to every instruction-set profile.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--key <key>', help: 'Component key to add.', required: true }, { name: '--from <manifest>', help: 'Manifest containing the component body.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions shape add planner --project core/evals --key skill --from planner.json'] },
|
|
55
|
+
{ path: ['instructions', 'shape', 'remove'], aliases: [['instruction-sets', 'shape', 'remove']], usage: 'orizu instructions shape remove <set> --project <team/project> --key <key> [--json]', summary: 'Remove one component key from every instruction-set profile.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--key <key>', help: 'Component key to remove.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions shape remove planner --project core/evals --key skill'] },
|
|
56
|
+
{
|
|
57
|
+
path: ['instructions', 'sync'],
|
|
58
|
+
aliases: [['instruction-sets', 'sync']],
|
|
59
|
+
usage: 'orizu instructions sync <set> --out <dir> [--model-config <identity>] [--project <team/project>] [--json]',
|
|
60
|
+
summary: 'Write an instruction set for offline runner loading.',
|
|
61
|
+
group: 'Instruction sets',
|
|
62
|
+
options: [{ name: '--out <dir>', help: 'Destination parent directory.', required: true }, { name: '--model-config <identity>', help: 'Sync only one profile plus default.' }, { name: '--project <team/project>', help: 'Project slug.' }, { name: '--json', help: 'Print source transport JSON.' }],
|
|
63
|
+
examples: ['orizu instructions sync planner --out ./instructions --project core/evals'],
|
|
64
|
+
},
|
|
65
|
+
{ path: ['instructions', 'archive'], aliases: [['instruction-sets', 'archive']], usage: 'orizu instructions archive <slug-or-exact-name> --project <team/project> [--json]', summary: 'Archive an instruction set without changing resolution or sync.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions archive planner --project core/evals'] },
|
|
66
|
+
{ path: ['instructions', 'restore'], aliases: [['instruction-sets', 'restore']], usage: 'orizu instructions restore <slug-or-exact-name> --project <team/project> [--json]', summary: 'Restore an archived instruction set.', group: 'Instruction sets', options: [{ name: '--project <team/project>', help: 'Project slug.', required: true }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu instructions restore planner --project core/evals'] },
|
|
28
67
|
{
|
|
29
68
|
path: ['login'],
|
|
30
69
|
usage: 'orizu login [--no-prompt-if-logged-in]',
|
|
@@ -317,39 +356,21 @@ export const COMMAND_DOCS = [
|
|
|
317
356
|
summary: 'List prompt artifacts in a project.',
|
|
318
357
|
group: 'Prompts and judges',
|
|
319
358
|
},
|
|
320
|
-
{
|
|
321
|
-
path: ['prompts', 'archive'],
|
|
322
|
-
usage: 'orizu prompts archive <prompt-id-or-name> --project <team/project> [--json]',
|
|
323
|
-
summary: 'Mark a prompt artifact as archived.',
|
|
324
|
-
group: 'Prompts and judges',
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
path: ['prompts', 'restore'],
|
|
328
|
-
usage: 'orizu prompts restore <prompt-id-or-name> --project <team/project> [--json]',
|
|
329
|
-
summary: 'Restore an archived prompt artifact to active status.',
|
|
330
|
-
group: 'Prompts and judges',
|
|
331
|
-
},
|
|
332
359
|
{
|
|
333
360
|
path: ['prompts', 'pull'],
|
|
334
361
|
usage: 'orizu prompts pull <prompt-id-or-name> --project <team/project> --out <dir> [--label <label> | --version <id>] [--json]',
|
|
335
362
|
summary: 'Pull a prompt artifact version to a local directory.',
|
|
336
363
|
group: 'Prompts and judges',
|
|
337
364
|
},
|
|
338
|
-
{
|
|
339
|
-
path: ['prompts', 'push'],
|
|
340
|
-
usage: 'orizu prompts push <dir> [--runner-version <id>] [--project <team/project>] [--parent <version-id>] [--session <session-id>] [--report-file <path>] [--json]',
|
|
341
|
-
summary: 'Push a local prompt artifact directory as a new version (with --session: a commit-first git draft).',
|
|
342
|
-
group: 'Prompts and judges',
|
|
343
|
-
},
|
|
344
365
|
{
|
|
345
366
|
path: ['prompts', 'report', 'set'],
|
|
346
|
-
usage: 'orizu prompts report set --prompt <id-or-name> --project <team/project> (--version <n> | --version-id <id>) (--report <markdown|@file> | --report-file <path>) [--json]',
|
|
367
|
+
usage: 'orizu prompts report set --prompt <id-or-name> [--project <team/project>] (--version <n> | --version-id <id>) (--report <markdown|@file> | --report-file <path>) [--json]',
|
|
347
368
|
summary: 'Upload or replace the Markdown report for one explicit prompt version.',
|
|
348
369
|
group: 'Prompts and judges',
|
|
349
370
|
aliases: [['prompts', 'report', 'upload']],
|
|
350
371
|
options: [
|
|
351
372
|
{ name: '--prompt <id-or-name>', help: 'Prompt ID or name.', required: true },
|
|
352
|
-
{ name: '--project <team/project>', help: 'Project slug containing the prompt.'
|
|
373
|
+
{ name: '--project <team/project>', help: 'Project slug containing the prompt.' },
|
|
353
374
|
{ name: '--version <n>', help: 'Positive prompt version number.' },
|
|
354
375
|
{ name: '--version-id <id>', help: 'Explicit prompt version ID.' },
|
|
355
376
|
{ name: '--report <markdown|@file>', help: 'Inline Markdown or an @file reference.' },
|
|
@@ -364,7 +385,7 @@ export const COMMAND_DOCS = [
|
|
|
364
385
|
{
|
|
365
386
|
path: ['prompts', 'labels', 'set'],
|
|
366
387
|
usage: 'orizu prompts labels set <prompt-name> <label> --version <version-id> [--project <team/project>] [--json]',
|
|
367
|
-
summary: 'Move or set a prompt label
|
|
388
|
+
summary: 'Move or set a non-production prompt label; use instructions profiles promote for production.',
|
|
368
389
|
group: 'Prompts and judges',
|
|
369
390
|
},
|
|
370
391
|
{
|
|
@@ -439,6 +460,12 @@ export const COMMAND_DOCS = [
|
|
|
439
460
|
summary: 'Execute a scorer locally for a prompt version or optimization candidate.',
|
|
440
461
|
group: 'Scorers and runners',
|
|
441
462
|
},
|
|
463
|
+
{
|
|
464
|
+
path: ['scorers', 'verify-parity'],
|
|
465
|
+
usage: 'orizu scorers verify-parity --scorer-version <id> --dataset-version <id> --split-set <id> [--split <name>] --outputs <outputs.jsonl> --original <module:function> [--scorer-input-contract gepa|flat_row] [--scorer-candidate-field <row-field>] [--runner-dir <dir>] [--python <cmd>] [--tolerance <float>] [--limit <n>] [--json]',
|
|
466
|
+
summary: 'Prove a migrated scorer runner scores rows the same as the original Python metric.',
|
|
467
|
+
group: 'Scorers and runners',
|
|
468
|
+
},
|
|
442
469
|
{
|
|
443
470
|
path: ['scores', 'submit'],
|
|
444
471
|
usage: 'orizu scores submit <results.jsonl|results.json> --scorer-version <id> (--subject-version <prompt-version-id> | --optimization-run <id> --candidate <id>) [--aggregate] [--dataset-version <id> --split-set <id> --split <name>] [--project <team/project>] [--json]',
|
|
@@ -511,6 +538,7 @@ export const COMMAND_DOCS = [
|
|
|
511
538
|
summary: 'List optimization runs with explicit archive visibility.',
|
|
512
539
|
group: 'Optimizations',
|
|
513
540
|
},
|
|
541
|
+
{ path: ['optimizations', 'promote'], usage: 'orizu optimizations promote <run-id> --candidate <id> [--label production] [--project <team/project>] [--json]', summary: 'Promote a selected optimization candidate.', group: 'Optimizations', options: [{ name: '--candidate <id>', help: 'Candidate to promote.', required: true }, { name: '--label production', help: 'Move the new tuple profile version to production.' }, { name: '--project <team/project>', help: 'Project slug (defaults to configured context).' }, { name: '--json', help: 'Print JSON.' }], examples: ['orizu optimizations promote <run-id> --candidate candidate-2 --label production'] },
|
|
514
542
|
{
|
|
515
543
|
path: ['optimizations', 'archive'],
|
|
516
544
|
usage: 'orizu optimizations archive <run-id> [--project <team/project>] [--json]',
|
|
@@ -525,8 +553,8 @@ export const COMMAND_DOCS = [
|
|
|
525
553
|
},
|
|
526
554
|
{
|
|
527
555
|
path: ['optimizations', 'run-gepa'],
|
|
528
|
-
usage: 'orizu optimizations run-gepa --project <team/project> --optimizer-version-id <id> --candidate-version-id <id> --runner-version-id <id> --candidate-runner-dir <dir> --scorer-version-id <id> --scorer-runner-version-id <id> --scorer-runner-dir <dir> [--scorer-input-contract gepa|flat_row] [--scorer-candidate-field <row-field>] [--allow-degenerate-seed] --dataset-version-id <id> --split-set-id <id> [--train-split train] [--val-split validation] [--budget auto|light|medium|heavy | --max-metric-calls <n> | --max-full-evals <n> | --max-iterations <n>] [--num-threads auto|N] [--reflection-retry-attempts N] [--reflection-http-timeout-seconds N] [--log-dir logs]',
|
|
529
|
-
summary: 'Run
|
|
556
|
+
usage: 'orizu optimizations run-gepa --project <team/project> --optimizer-version-id <id> (--candidate-version-id <id> | --instruction-set <name> --model-config <identity> [--component-selector round-robin|all]) --runner-version-id <id> --candidate-runner-dir <dir> --scorer-version-id <id> --scorer-runner-version-id <id> --scorer-runner-dir <dir> [--engine official|legacy] [--scorer-input-contract gepa|flat_row] [--scorer-candidate-field <row-field>] [--allow-degenerate-seed] --dataset-version-id <id> --split-set-id <id> [--train-split train] [--val-split validation] [--budget auto|light|medium|heavy | --max-metric-calls <n> | --max-full-evals <n> | --max-iterations <n> | --max-candidate-proposals <n>] [--num-threads auto|N] [--reflection-retry-attempts N] [--reflection-http-timeout-seconds N] [--log-dir logs]',
|
|
557
|
+
summary: 'Run official GEPA locally and stream events; pass --engine legacy only for the frozen safety hatch. --instruction-set requires --model-config and cannot be combined with --candidate-version-id; round-robin updates one component-map entry per round and all updates every component. --max-candidate-proposals is official-engine-only. Validates the scorer contract on the seed before iterating; judge runners built for flat-row score runs need --scorer-input-contract flat_row (ALI-1158).',
|
|
530
558
|
group: 'Optimizations',
|
|
531
559
|
},
|
|
532
560
|
{
|
|
@@ -1029,6 +1057,46 @@ export const COMMAND_DOCS = [
|
|
|
1029
1057
|
],
|
|
1030
1058
|
examples: ['orizu connectors', 'orizu connectors status --project highlight/hip --json'],
|
|
1031
1059
|
},
|
|
1060
|
+
{
|
|
1061
|
+
path: ['model-configs', 'create'],
|
|
1062
|
+
usage: 'orizu model-configs create <provider/model> [--settings <json|@file>] [--name <name>] [--project <team/project>] [--json]',
|
|
1063
|
+
summary: 'Create a provider-qualified model config with its first settings version.',
|
|
1064
|
+
group: 'Model configs',
|
|
1065
|
+
options: [{ name: '--settings <json|@file>', help: 'Optional JSON settings object or a JSON file; defaults to {}.' }, { name: '--name <name>', help: 'Optional display name.' }, { name: '--project <team/project>', help: 'Project that owns the config.' }, { name: '--json', help: 'Emit the machine-readable model config.' }],
|
|
1066
|
+
examples: ['orizu model-configs create azure/gpt-5.4-mini --settings @settings.json'],
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
path: ['model-configs', 'list'],
|
|
1070
|
+
usage: 'orizu model-configs list [--project <team/project>] [--json]',
|
|
1071
|
+
summary: 'List model configs for a project.',
|
|
1072
|
+
group: 'Model configs',
|
|
1073
|
+
options: [{ name: '--project <team/project>', help: 'Project whose configs to list.' }, { name: '--json', help: 'Emit machine-readable model configs.' }],
|
|
1074
|
+
examples: ['orizu model-configs list --project core/evals --json'],
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
path: ['model-configs', 'show'],
|
|
1078
|
+
usage: 'orizu model-configs show <provider/model> [--project <team/project>] [--json]',
|
|
1079
|
+
summary: 'Show a model config and its current settings version.',
|
|
1080
|
+
group: 'Model configs',
|
|
1081
|
+
options: [{ name: '--project <team/project>', help: 'Project that owns the config.' }, { name: '--json', help: 'Emit the machine-readable model config.' }],
|
|
1082
|
+
examples: ['orizu model-configs show openai/gpt-5.4-mini'],
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
path: ['model-configs', 'settings', 'set'],
|
|
1086
|
+
usage: 'orizu model-configs settings set <provider/model> --settings <json|@file> [--project <team/project>] [--json]',
|
|
1087
|
+
summary: 'Add a settings version and advance the config current pointer.',
|
|
1088
|
+
group: 'Model configs',
|
|
1089
|
+
options: [{ name: '--settings <json|@file>', help: 'JSON settings object or a JSON file.', required: true }, { name: '--project <team/project>', help: 'Project that owns the config.' }, { name: '--json', help: 'Emit the machine-readable model config.' }],
|
|
1090
|
+
examples: ["orizu model-configs settings set openai/gpt-5.4-mini --settings '{\"temperature\":0.2}'"],
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
path: ['model-configs', 'copy'],
|
|
1094
|
+
usage: 'orizu model-configs copy <provider/model> --to <provider/model> [--project <team/project>] [--json]',
|
|
1095
|
+
summary: 'Copy the current settings snapshot to a new provider-qualified config.',
|
|
1096
|
+
group: 'Model configs',
|
|
1097
|
+
options: [{ name: '--to <provider/model>', help: 'New provider-qualified config identity.', required: true }, { name: '--project <team/project>', help: 'Project that owns the config.' }, { name: '--json', help: 'Emit the machine-readable model config.' }],
|
|
1098
|
+
examples: ['orizu model-configs copy openai/gpt-5.4-mini --to azure/gpt-5.4-mini'],
|
|
1099
|
+
},
|
|
1032
1100
|
{
|
|
1033
1101
|
path: ['manifests', 'list'],
|
|
1034
1102
|
usage: 'orizu manifests list [--project <team/project>] [--status <status>] [--json]',
|
|
@@ -1097,8 +1165,8 @@ export function commandDocsWithPrefix(args) {
|
|
|
1097
1165
|
if (args.length === 0) {
|
|
1098
1166
|
return COMMAND_DOCS;
|
|
1099
1167
|
}
|
|
1100
|
-
return COMMAND_DOCS.filter(doc => args.every((part, index) =>
|
|
1101
|
-
|
|
1168
|
+
return COMMAND_DOCS.filter(doc => [doc.path, ...(doc.aliases || [])].some(path => args.every((part, index) => path[index] === part) &&
|
|
1169
|
+
path.length > args.length));
|
|
1102
1170
|
}
|
|
1103
1171
|
function formatRows(rows, indent = ' ') {
|
|
1104
1172
|
const width = Math.max(...rows.map(row => row[0].length));
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `orizu internal hosted-boot` — the in-sandbox BOOT ENTRYPOINT for the DO-path
|
|
3
|
+
* hosted agent (ALI-1057). The session coordinator's Durable Object launches
|
|
4
|
+
* this DETACHED (`ORIZU_SANDBOX_ENTRYPOINT`, via nohup) once it has verified the
|
|
5
|
+
* pre-baked runtime marker; from here the sandbox bootstraps itself under the
|
|
6
|
+
* PULL model (ALI-1055): no operator writes its credentials, and no bearer or
|
|
7
|
+
* connector secret ever rests in Cloudflare.
|
|
8
|
+
*
|
|
9
|
+
* WHAT DIFFERS FROM THE OPERATOR PATH (packages/cli/src/hosted-session-cli.ts +
|
|
10
|
+
* hosted-bootstrap.ts) — and ONLY this:
|
|
11
|
+
* (a) credentials are PULLED over HTTP at boot instead of the operator writing
|
|
12
|
+
* a 0600 bearer file: the boot secret is exchanged for a fresh Orizu agent
|
|
13
|
+
* bearer at ORIZU_AGENT_TOKEN_URL, and the connector env comes from
|
|
14
|
+
* ORIZU_ENV_BUNDLE_URL (the 5A contract — connectors only, NO model key);
|
|
15
|
+
* (b) the git credential helper runs in PULL MODE (hosted-runtime-assets.ts):
|
|
16
|
+
* it GETs a fresh bearer per git op from the agent-token URL (boot-secret
|
|
17
|
+
* auth) rather than reading a host-rotated 0600 file.
|
|
18
|
+
* Everything else — the clone via the credential helper, the loop, the event
|
|
19
|
+
* sink, redaction — is REUSED, not reimplemented.
|
|
20
|
+
*
|
|
21
|
+
* FROZEN ENV CONTRACT (workers/session-coordinator/src/bootstrap.ts
|
|
22
|
+
* `planSandboxEnv`). Required (fail-fast if any is missing):
|
|
23
|
+
* ORIZU_BOOT_SECRET the per-sandbox durable bootstrap secret;
|
|
24
|
+
* ORIZU_AGENT_TOKEN_URL {coordinator}/sessions/:id/agent-token (bearer pull);
|
|
25
|
+
* ORIZU_ENV_BUNDLE_URL {orizu}/api/coordinator/sessions/:id/env-bundle;
|
|
26
|
+
* ORIZU_BASE_URL the Orizu control-plane origin;
|
|
27
|
+
* ORIZU_SESSION_ID this session id.
|
|
28
|
+
* Present-but-optional in the contract, resolved from the control plane when
|
|
29
|
+
* absent: ORIZU_RUN_ID, ORIZU_WORKSPACE_ID (read back from the session), and the
|
|
30
|
+
* non-secret ANTHROPIC_API_KEY dummy placeholder (firewall brokers the real key).
|
|
31
|
+
*/
|
|
32
|
+
import { type HostedLoopContext, type HostedLoopResult } from './hosted-loop.js';
|
|
33
|
+
export type BootFetch = (url: string, init?: RequestInit) => Promise<Response>;
|
|
34
|
+
export declare const REQUIRED_BOOT_ENV_VARS: readonly ["ORIZU_BOOT_SECRET", "ORIZU_AGENT_TOKEN_URL", "ORIZU_ENV_BUNDLE_URL", "ORIZU_BASE_URL", "ORIZU_SESSION_ID"];
|
|
35
|
+
export interface HostedBootEnv {
|
|
36
|
+
bootSecret: string;
|
|
37
|
+
agentTokenUrl: string;
|
|
38
|
+
/** {coordinator}/sessions/:id/boot-status — the ALI-1060 agent-liveness
|
|
39
|
+
* callback, derived from agentTokenUrl (same boot-secret auth). */
|
|
40
|
+
bootStatusUrl: string;
|
|
41
|
+
envBundleUrl: string;
|
|
42
|
+
baseUrl: string;
|
|
43
|
+
sessionId: string;
|
|
44
|
+
/** Present in the contract only for resume flows; else resolved server-side. */
|
|
45
|
+
runId: string | null;
|
|
46
|
+
/** Rarely set by the DO (the start body carries no workspace id); read back
|
|
47
|
+
* from the session when absent. */
|
|
48
|
+
workspaceId: string | null;
|
|
49
|
+
/** Non-secret dummy the firewall rewrites on egress — never a real key. */
|
|
50
|
+
anthropicDummyKey: string | null;
|
|
51
|
+
}
|
|
52
|
+
/** Validate the frozen env contract. A list of missing REQUIRED names means the
|
|
53
|
+
* boot must FAIL FAST with a clear error (the DO records the non-zero exit). */
|
|
54
|
+
export declare function resolveHostedBootEnv(env: Record<string, string | undefined>): {
|
|
55
|
+
ok: true;
|
|
56
|
+
value: HostedBootEnv;
|
|
57
|
+
} | {
|
|
58
|
+
ok: false;
|
|
59
|
+
missing: string[];
|
|
60
|
+
};
|
|
61
|
+
/** The boot-status route is the agent-token route's sibling; swap the trailing
|
|
62
|
+
* path segment. Falls back to appending when the shape is unexpected. */
|
|
63
|
+
export declare function deriveBootStatusUrl(agentTokenUrl: string): string;
|
|
64
|
+
/** Best-effort scrub + truncate for a reported failure reason: never leak the
|
|
65
|
+
* boot secret (the one credential the boot always holds), and keep it short. */
|
|
66
|
+
export declare function redactBootReason(reason: string, bootSecret: string): string;
|
|
67
|
+
/**
|
|
68
|
+
* Report the boot outcome to the coordinator's boot-status route (ALI-1060),
|
|
69
|
+
* authed with the boot secret (same as the agent-token pull). Best-effort: the
|
|
70
|
+
* DO's own readiness-timeout is the backstop if this never lands, so a failed
|
|
71
|
+
* report must never mask the boot result. NEVER logs the secret.
|
|
72
|
+
*/
|
|
73
|
+
export declare function postBootStatus(opts: {
|
|
74
|
+
bootStatusUrl: string;
|
|
75
|
+
bootSecret: string;
|
|
76
|
+
/** 'ready' | 'failed' are the ALI-1060 liveness signals; 'complete' is the
|
|
77
|
+
* ALI-1064 terminal signal — the loop finished (after auto-harvest), so the
|
|
78
|
+
* DO ends the workspace session and stops instead of extending to 24h. */
|
|
79
|
+
status: 'ready' | 'failed' | 'complete';
|
|
80
|
+
runId: string | null;
|
|
81
|
+
reason?: string | null;
|
|
82
|
+
fetchImpl: BootFetch;
|
|
83
|
+
log?: (line: string) => void;
|
|
84
|
+
}): Promise<void>;
|
|
85
|
+
export interface PulledBearer {
|
|
86
|
+
token: string;
|
|
87
|
+
/** Epoch ms, or null when the response omitted a parseable expiry. */
|
|
88
|
+
expiresAtMs: number | null;
|
|
89
|
+
}
|
|
90
|
+
export interface PullAgentBearerOptions {
|
|
91
|
+
agentTokenUrl: string;
|
|
92
|
+
bootSecret: string;
|
|
93
|
+
fetchImpl: BootFetch;
|
|
94
|
+
/** Total attempts before giving up (the DO may still be arming). Default 5. */
|
|
95
|
+
attempts?: number;
|
|
96
|
+
/** Base backoff in ms (doubles each retry). Default 500. */
|
|
97
|
+
backoffMs?: number;
|
|
98
|
+
sleep?: (ms: number) => Promise<void>;
|
|
99
|
+
log?: (line: string) => void;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Exchange the boot secret for a fresh Orizu agent bearer at the coordinator's
|
|
103
|
+
* agent-token route (`GET`, `Authorization: Bearer <boot secret>` → 200
|
|
104
|
+
* `{token, tokenId, expiresAt}`). Retries with exponential backoff: the DO
|
|
105
|
+
* persists the boot-secret digest and serves this route DURING bootstrap, but a
|
|
106
|
+
* transient mint failure (control-plane blip) should not abort the whole boot.
|
|
107
|
+
* The secret is NEVER logged.
|
|
108
|
+
*/
|
|
109
|
+
export declare function pullAgentBearer(opts: PullAgentBearerOptions): Promise<PulledBearer>;
|
|
110
|
+
export interface EnvBundleConnector {
|
|
111
|
+
ref: string;
|
|
112
|
+
envVar: string;
|
|
113
|
+
value: string;
|
|
114
|
+
}
|
|
115
|
+
export interface EnvBundle {
|
|
116
|
+
sessionId: string | null;
|
|
117
|
+
connectors: EnvBundleConnector[];
|
|
118
|
+
redactEnvVars: string[];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Pull the connector env bundle (5A contract): `GET` with the agent bearer → 200
|
|
122
|
+
* `{sessionId, connectors:[{ref,envVar,value}], redactEnvVars:[...]}`. The model
|
|
123
|
+
* key is DELIBERATELY absent (brokered at the firewall). Never logs a value.
|
|
124
|
+
*/
|
|
125
|
+
export declare function fetchEnvBundle(opts: {
|
|
126
|
+
envBundleUrl: string;
|
|
127
|
+
bearer: string;
|
|
128
|
+
fetchImpl: BootFetch;
|
|
129
|
+
}): Promise<EnvBundle>;
|
|
130
|
+
/**
|
|
131
|
+
* Export each connector `{envVar: value}` into the environment the loop/agent
|
|
132
|
+
* inherits, and REGISTER every redacted var on `ORIZU_INJECTED_ENV_VARS` — the
|
|
133
|
+
* exact hook the in-sandbox loop reads (`redactionListFromEnv`) to scrub these
|
|
134
|
+
* values from run events. Returns the merged redaction-var list.
|
|
135
|
+
*/
|
|
136
|
+
export declare function applyEnvBundle(bundle: EnvBundle, env: Record<string, string | undefined>): string[];
|
|
137
|
+
export interface ResolvedSession {
|
|
138
|
+
workspaceId: string;
|
|
139
|
+
repoBranch: string;
|
|
140
|
+
task: string;
|
|
141
|
+
model: string | null;
|
|
142
|
+
reasoningEffort: string | null;
|
|
143
|
+
/** Session lifetime in minutes (from client_info), if the coordinator recorded
|
|
144
|
+
* it — used to derive the per-prompt max-duration cap (ALI-1061). */
|
|
145
|
+
durationMinutes: number | null;
|
|
146
|
+
/** Most recent existing run id, if any (else the boot creates one). */
|
|
147
|
+
runId: string | null;
|
|
148
|
+
}
|
|
149
|
+
/** GET the session (agent-capable, RLS-scoped) to learn its workspace, branch,
|
|
150
|
+
* task, and any existing run — the DO start body carries none of these. */
|
|
151
|
+
export declare function resolveSession(opts: {
|
|
152
|
+
baseUrl: string;
|
|
153
|
+
sessionId: string;
|
|
154
|
+
bearer: string;
|
|
155
|
+
fetchImpl: BootFetch;
|
|
156
|
+
}): Promise<ResolvedSession>;
|
|
157
|
+
/** Reuse an existing run or start one with the AGENT bearer (actor_type='agent'),
|
|
158
|
+
* exactly like the operator path's run-start step. */
|
|
159
|
+
export declare function ensureRun(opts: {
|
|
160
|
+
baseUrl: string;
|
|
161
|
+
sessionId: string;
|
|
162
|
+
bearer: string;
|
|
163
|
+
fetchImpl: BootFetch;
|
|
164
|
+
existingRunId: string | null;
|
|
165
|
+
title?: string;
|
|
166
|
+
}): Promise<string>;
|
|
167
|
+
/** Mint a session_read repo token to learn the repo full name, then build the
|
|
168
|
+
* GitHub clone URL (mirrors the operator path's `defaultResolveRepo`). */
|
|
169
|
+
export declare function resolveRepo(opts: {
|
|
170
|
+
baseUrl: string;
|
|
171
|
+
workspaceId: string;
|
|
172
|
+
sessionId: string;
|
|
173
|
+
bearer: string;
|
|
174
|
+
fetchImpl: BootFetch;
|
|
175
|
+
}): Promise<{
|
|
176
|
+
repoFullName: string;
|
|
177
|
+
cloneUrl: string;
|
|
178
|
+
}>;
|
|
179
|
+
export interface BootExecResult {
|
|
180
|
+
status: number;
|
|
181
|
+
stdout: string;
|
|
182
|
+
stderr: string;
|
|
183
|
+
}
|
|
184
|
+
export type BootExec = (cmd: string, args: string[], opts?: {
|
|
185
|
+
cwd?: string;
|
|
186
|
+
}) => BootExecResult;
|
|
187
|
+
export declare function assertSafeRunId(runId: string): void;
|
|
188
|
+
export interface RunHostedBootOptions {
|
|
189
|
+
env: HostedBootEnv;
|
|
190
|
+
/** Mutable env map the loop/agent inherits (default: process.env). */
|
|
191
|
+
processEnv?: Record<string, string | undefined>;
|
|
192
|
+
/** Sandbox root the run dir + repo live under (default: process.cwd()). */
|
|
193
|
+
root?: string;
|
|
194
|
+
fetchImpl?: BootFetch;
|
|
195
|
+
exec?: BootExec;
|
|
196
|
+
/** File writer (default: atomic 0600 temp+rename). Injected in tests. */
|
|
197
|
+
writeFile?: (path: string, contents: string) => void;
|
|
198
|
+
/** File reader (default: readFileSync utf8). Injected in tests so the
|
|
199
|
+
* bearer-provider read is backed by the same store as writeFile. */
|
|
200
|
+
readFile?: (path: string) => string;
|
|
201
|
+
/** Dir maker (default: recursive mkdir). Injected in tests. */
|
|
202
|
+
mkdirp?: (path: string) => void;
|
|
203
|
+
/** Run the loop (default: `runHostedLoop`). Injected in tests. */
|
|
204
|
+
runLoop?: (input: {
|
|
205
|
+
context: HostedLoopContext;
|
|
206
|
+
taskPrompt: string;
|
|
207
|
+
bearerProvider: () => string;
|
|
208
|
+
/** Verbatim secrets the loop's event redaction must scrub (ALI-1062: the
|
|
209
|
+
* boot secret — bare hex, so no shape pattern would ever catch it). */
|
|
210
|
+
redactSecretsList: readonly string[];
|
|
211
|
+
}) => Promise<HostedLoopResult>;
|
|
212
|
+
now?: () => number;
|
|
213
|
+
log?: (line: string) => void;
|
|
214
|
+
/** Bearer-pull tuning (passed through to `pullAgentBearer`). */
|
|
215
|
+
bearerAttempts?: number;
|
|
216
|
+
bearerBackoffMs?: number;
|
|
217
|
+
sleep?: (ms: number) => Promise<void>;
|
|
218
|
+
/** ALI-1060: invoked once the run id + agent bearer are known (after
|
|
219
|
+
* ensureRun), so a caller can report/mark on a LATER throw. */
|
|
220
|
+
onBootContext?: (ctx: {
|
|
221
|
+
runId: string;
|
|
222
|
+
bearer: string;
|
|
223
|
+
}) => void;
|
|
224
|
+
}
|
|
225
|
+
export interface HostedBootResult {
|
|
226
|
+
ok: boolean;
|
|
227
|
+
runId: string | null;
|
|
228
|
+
loopStatus: string | null;
|
|
229
|
+
error: string | null;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The full in-sandbox boot: validate → pull bearer → pull+apply env bundle →
|
|
233
|
+
* resolve session/run/repo → write the pull-mode credential assets → clone the
|
|
234
|
+
* session branch → launch the hosted loop (reused, in-process) with a bearer
|
|
235
|
+
* provider fed by the same pull-mode source. Returns the loop's terminal status.
|
|
236
|
+
*/
|
|
237
|
+
export declare function runHostedBoot(opts: RunHostedBootOptions): Promise<HostedBootResult>;
|
|
238
|
+
export interface HostedBootCommandIo {
|
|
239
|
+
print: (line: string) => void;
|
|
240
|
+
printErr?: (line: string) => void;
|
|
241
|
+
json?: boolean;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Read the frozen env contract from the process env and run the boot. Fails fast
|
|
245
|
+
* (exit 1) with a clear message naming every missing required var. The DO records
|
|
246
|
+
* the exit code; run failures beyond the boot itself are recorded server-side.
|
|
247
|
+
*/
|
|
248
|
+
export declare function hostedBootCommand(io: HostedBootCommandIo): Promise<number>;
|
|
249
|
+
/**
|
|
250
|
+
* Failure fan-out on a boot throw (ALI-1060): mark the run terminally `failed`
|
|
251
|
+
* (the operator path's agent-bearer terminal PATCH) and always signal the
|
|
252
|
+
* coordinator's boot-status route so the DO tears the sandbox down promptly.
|
|
253
|
+
* Best-effort throughout — the boot secret is scrubbed from the reported reason.
|
|
254
|
+
*
|
|
255
|
+
* PRE-BEARER failures (a throw before `onBootContext` — `pullAgentBearer` /
|
|
256
|
+
* `fetchEnvBundle` blew up, so `ctx` is null) still have a run id: the server
|
|
257
|
+
* PRE-CREATES it and injects ORIZU_RUN_ID. We attempt a SHORT bearer pull here
|
|
258
|
+
* so we can self-mark that run failed rather than leaving it `running` until the
|
|
259
|
+
* DO's readiness timeout. If even that pull fails, the DO backstop (boot-status
|
|
260
|
+
* failure now, readiness timeout otherwise) is the last line.
|
|
261
|
+
*/
|
|
262
|
+
export declare function reportBootFailure(opts: {
|
|
263
|
+
env: HostedBootEnv;
|
|
264
|
+
ctx: {
|
|
265
|
+
runId: string;
|
|
266
|
+
bearer: string;
|
|
267
|
+
} | null;
|
|
268
|
+
reason: string;
|
|
269
|
+
log: (line: string) => void;
|
|
270
|
+
/** Injectable transport (default: global fetch). Exposed for tests. */
|
|
271
|
+
fetchImpl?: BootFetch;
|
|
272
|
+
}): Promise<void>;
|
|
273
|
+
//# sourceMappingURL=hosted-boot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-boot.d.ts","sourceRoot":"","sources":["../src/hosted-boot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAgBH,OAAO,EAGL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,kBAAkB,CAAA;AAKzB,MAAM,M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AE,MAAM,KAAK,IAAI,CAAA;IAC3B,uEAAuE;IACvE,SAAS,CAAC,EAAE,SAAS,CAAA;CACtB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ChB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained rehearsal for the hosted bootstrap (ALI-925), extending the
|
|
3
|
+
* ALI-973 `daytona-slice-rehearsal` pattern.
|
|
4
|
+
*
|
|
5
|
+
* The whole `bootstrapHostedSandbox` flow runs against the local-sim provider
|
|
6
|
+
* with NO Daytona and NO GitHub: a REAL bare git repo backs the session branch,
|
|
7
|
+
* and a REAL HTTP broker (`hosted-broker-server.ts`) stands in for the Orizu
|
|
8
|
+
* control plane (per-repo token broker + RunAPI event ingest).
|
|
9
|
+
*
|
|
10
|
+
* The broker runs as a SEPARATE PROCESS on purpose: local-sim's `exec` blocks on
|
|
11
|
+
* `spawnSync`, and the in-sandbox credential helper it runs calls the broker over
|
|
12
|
+
* the network — an in-process server could not answer while the test thread is
|
|
13
|
+
* blocked. The broker journals events/tokens to files the rehearsal reads back.
|
|
14
|
+
*/
|
|
15
|
+
import { type SandboxProvider } from './sandbox-provider.js';
|
|
16
|
+
import type { BrokerConfig } from './hosted-broker-server.js';
|
|
17
|
+
import { type GitHttpConfig } from './hosted-git-http-server.js';
|
|
18
|
+
export interface SpawnedBroker {
|
|
19
|
+
apiBaseUrl: string;
|
|
20
|
+
port: number;
|
|
21
|
+
stop: () => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Env keys the broker server reads (kept here so callers do not hand-roll them).
|
|
25
|
+
*/
|
|
26
|
+
export declare function brokerEnv(config: BrokerConfig): Record<string, string>;
|
|
27
|
+
/**
|
|
28
|
+
* Spawn the broker server as its own process and resolve once it prints
|
|
29
|
+
* `LISTENING <port>` on stdout.
|
|
30
|
+
*/
|
|
31
|
+
export declare function spawnBrokerProcess(config: BrokerConfig): Promise<SpawnedBroker>;
|
|
32
|
+
export interface SpawnedGitHttpServer {
|
|
33
|
+
baseUrl: string;
|
|
34
|
+
port: number;
|
|
35
|
+
stop: () => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Spawn the authenticated smart-HTTP git server as its own process (same
|
|
39
|
+
* separate-process rationale as the broker) and resolve once it prints
|
|
40
|
+
* `LISTENING <port>`. `baseUrl` is the clone URL root; append the repo segment.
|
|
41
|
+
*/
|
|
42
|
+
export declare function spawnGitHttpProcess(config: GitHttpConfig): Promise<SpawnedGitHttpServer>;
|
|
43
|
+
export interface RecordedRehearsalEvent {
|
|
44
|
+
runId: string;
|
|
45
|
+
eventId: string;
|
|
46
|
+
sequence: number;
|
|
47
|
+
eventType: string;
|
|
48
|
+
payload: unknown;
|
|
49
|
+
}
|
|
50
|
+
export interface HostedBootstrapRehearsal {
|
|
51
|
+
apiBaseUrl: string;
|
|
52
|
+
bearer: string;
|
|
53
|
+
workspaceId: string;
|
|
54
|
+
sessionId: string;
|
|
55
|
+
runId: string;
|
|
56
|
+
sessionBranch: string;
|
|
57
|
+
repoFullName: string;
|
|
58
|
+
provider: SandboxProvider;
|
|
59
|
+
resolveCloneUrl: (repo: string) => string;
|
|
60
|
+
/** VCS host the helper is scoped to (the loopback git server). */
|
|
61
|
+
host: string;
|
|
62
|
+
/** Loopback hosts the helper may serve over plain HTTP (rehearsal only). */
|
|
63
|
+
insecureHttpHosts: readonly string[];
|
|
64
|
+
/** All run events the broker accepted, in arrival order. */
|
|
65
|
+
events: () => RecordedRehearsalEvent[];
|
|
66
|
+
/** Every token value the broker minted (for residue-sweep assertions). */
|
|
67
|
+
tokensIssued: () => string[];
|
|
68
|
+
/** Every Basic-auth password the git server received (proves password===token). */
|
|
69
|
+
basicAuthPasswords: () => string[];
|
|
70
|
+
cleanup: () => Promise<void>;
|
|
71
|
+
}
|
|
72
|
+
export interface RehearsalOptions {
|
|
73
|
+
bearer?: string;
|
|
74
|
+
keep?: boolean;
|
|
75
|
+
/** Seed `.orizu/setup.sh` onto the session branch (force-added past the
|
|
76
|
+
* workbench `.orizu/` gitignore) so the setup-hook step has a hook to run. */
|
|
77
|
+
setupHookBody?: string;
|
|
78
|
+
/** Force the repo-token broker to a status (tests the 4xx credential path). */
|
|
79
|
+
repoTokenStatus?: number;
|
|
80
|
+
/** Force the run-events ingest to a status (tests the failure path). */
|
|
81
|
+
eventsStatus?: number;
|
|
82
|
+
/** Serve the full RunAPI + session + agent-token surface (P3.5 e2e). */
|
|
83
|
+
fullRunApi?: boolean;
|
|
84
|
+
}
|
|
85
|
+
export declare function createHostedBootstrapRehearsal(options?: RehearsalOptions): Promise<HostedBootstrapRehearsal>;
|
|
86
|
+
//# sourceMappingURL=hosted-bootstrap-rehearsal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hosted-bootstrap-rehearsal.d.ts","sourceRoot":"","sources":["../src/hosted-bootstrap-rehearsal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,OAAO,EAA0B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACpF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAuC5E,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,IAAI,CAAA;CACjB;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkBtE;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CA0BrF;AAED,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,IAAI,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