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,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Transport-agnostic deploy-key merge core (ALI-1084, merge-sandbox-job
|
|
3
|
+
* Phase 0). Extracted VERBATIM from `lib/git-ssh-merge.ts` so both the server
|
|
4
|
+
* (`lib/`) and the published CLI (`orizu internal merge-job`, Phase 2) run the
|
|
5
|
+
* EXACT SAME merge logic — no forked implementations, one place where the
|
|
6
|
+
* ADR-007 §4 `--no-ff` invariant is asserted on the exact argv.
|
|
7
|
+
*
|
|
8
|
+
* DELIBERATELY NO `import 'server-only'`: this module runs inside the one-shot
|
|
9
|
+
* merge sandbox (a plain Node process) as well as on the server. It must not
|
|
10
|
+
* import anything outside the CLI package root (bun-bundled) — node builtins
|
|
11
|
+
* only. `lib/git-ssh-merge.ts` re-exports everything here so every existing
|
|
12
|
+
* server import path and test keeps working unchanged.
|
|
13
|
+
*
|
|
14
|
+
* SECURITY PROPERTIES (unchanged from the lib original):
|
|
15
|
+
* - throwaway temp worktree + isolated SSH identity (key file mode 0600);
|
|
16
|
+
* - pinned GitHub host keys (StrictHostKeyChecking=yes, own known_hosts);
|
|
17
|
+
* - expected-head verification: the merge targets the REVIEWED SHA, never a
|
|
18
|
+
* branch name;
|
|
19
|
+
* - `merge-base --is-ancestor` alreadyMerged idempotency check;
|
|
20
|
+
* - argv-asserted commit-preserving `--no-ff` merge (ADR-007 §4).
|
|
21
|
+
*/
|
|
22
|
+
export interface MergeBranchWithDeployKeyInput {
|
|
23
|
+
base: string;
|
|
24
|
+
sourceBranch: string;
|
|
25
|
+
expectedHeadSha: string;
|
|
26
|
+
commitMessage: string;
|
|
27
|
+
privateKeyPem: string;
|
|
28
|
+
}
|
|
29
|
+
export interface GitCommandResult {
|
|
30
|
+
exitCode: number;
|
|
31
|
+
stdout: string;
|
|
32
|
+
stderr: string;
|
|
33
|
+
}
|
|
34
|
+
export type GitCommandRunner = (args: string[], options: {
|
|
35
|
+
cwd: string;
|
|
36
|
+
env: NodeJS.ProcessEnv;
|
|
37
|
+
}) => Promise<GitCommandResult>;
|
|
38
|
+
export interface MergeBranchWithDeployKeyDeps {
|
|
39
|
+
runGit?: GitCommandRunner;
|
|
40
|
+
/**
|
|
41
|
+
* D8 pre-push gate (merge-sandbox-job Phase 2): called IMMEDIATELY before
|
|
42
|
+
* `git push`, after the merge commit exists locally. Returning `false`
|
|
43
|
+
* aborts WITHOUT pushing (`superseded: true` in the result) — a manifest
|
|
44
|
+
* rejected while the job was in flight must never reach `main`. Absent
|
|
45
|
+
* (the local/server executor), the merge pushes unconditionally as before.
|
|
46
|
+
*/
|
|
47
|
+
prePushGate?: () => Promise<boolean>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The merge outcome contract. Structurally identical to `MergeResult` in
|
|
51
|
+
* `lib/github-repo-ops.ts` (which cannot be imported from the CLI package —
|
|
52
|
+
* it is server-only); TypeScript's structural typing keeps the two
|
|
53
|
+
* assignable, and `lib/git-ssh-merge.ts` continues to expose the lib-side
|
|
54
|
+
* type to server callers.
|
|
55
|
+
*/
|
|
56
|
+
export interface DeployKeyMergeResult {
|
|
57
|
+
merged: boolean;
|
|
58
|
+
sha: string | null;
|
|
59
|
+
/** true when the base already contained head (GitHub 204 equivalent). */
|
|
60
|
+
alreadyMerged: boolean;
|
|
61
|
+
/** true when git reported a merge conflict (409 equivalent). */
|
|
62
|
+
conflict: boolean;
|
|
63
|
+
/** true when the D8 pre-push gate refused the push (manifest no longer
|
|
64
|
+
* appliable) — the merge commit was built but NEVER pushed. */
|
|
65
|
+
superseded?: boolean;
|
|
66
|
+
status: number;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Assert a git invocation is the commit-preserving seal merge ADR-007 §4
|
|
70
|
+
* requires. Called on the exact argv the merge runs with, so the invariant is
|
|
71
|
+
* enforced where the merge happens rather than by reviewer vigilance.
|
|
72
|
+
*/
|
|
73
|
+
export declare function assertCommitPreservingMergeArgs(args: readonly string[]): void;
|
|
74
|
+
/**
|
|
75
|
+
* Strip git's repo-context env vars from a child git's environment. Git
|
|
76
|
+
* EXPORTS these into hook subprocesses (from a linked worktree, GIT_DIR is an
|
|
77
|
+
* ABSOLUTE path into the shared .git), so any descendant git command that
|
|
78
|
+
* inherits the parent env operates on THAT repo instead of its own cwd —
|
|
79
|
+
* `git config` writes land in the shared .git/config and `git init` flips it
|
|
80
|
+
* to core.bare=true (both observed when the pre-push hook ran the test suite
|
|
81
|
+
* from a worktree). Every real-git spawn must build its env through this.
|
|
82
|
+
*/
|
|
83
|
+
export declare function scrubGitRepoContextEnv(env?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
84
|
+
export declare function defaultRunGit(args: string[], options: {
|
|
85
|
+
cwd: string;
|
|
86
|
+
env: NodeJS.ProcessEnv;
|
|
87
|
+
}): Promise<GitCommandResult>;
|
|
88
|
+
export declare function sshRemote(repoFullName: string): string;
|
|
89
|
+
/**
|
|
90
|
+
* The SSH-over-the-HTTPS-port remote (GitHub-supported: `ssh.github.com:443`
|
|
91
|
+
* speaks the same SSH protocol, same auth, same host-key set). The MERGE core
|
|
92
|
+
* uses this endpoint because the merge sandbox's egress firewall enforces at
|
|
93
|
+
* the SNI/CIDR layer and reset raw SSH on :22 in the first live run
|
|
94
|
+
* (ALI-1084); :443 within GitHub's published git CIDRs is the compatible
|
|
95
|
+
* path. Equivalent from dev machines, so local/sandbox parity holds (D6).
|
|
96
|
+
* The push/read paths (D9/Phase 6) keep `sshRemote` untouched.
|
|
97
|
+
*/
|
|
98
|
+
export declare function sshRemoteOverHttpsPort(repoFullName: string): string;
|
|
99
|
+
/** Exported for `lib/git-ssh-merge.ts` (pushFilesWithDeployKey keeps living
|
|
100
|
+
* there — D9 scopes the push path as a follow-on, not part of the core). */
|
|
101
|
+
export declare function assertGitOk(result: GitCommandResult, operation: string): void;
|
|
102
|
+
export interface DeployKeyGitContext {
|
|
103
|
+
dir: string;
|
|
104
|
+
git: (args: string[]) => Promise<GitCommandResult>;
|
|
105
|
+
gitOk: (args: string[], operation: string) => Promise<GitCommandResult>;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Run a callback inside a throwaway git worktree wired to the repo's merge
|
|
109
|
+
* deploy key (isolated SSH identity + pinned GitHub host keys). Exported for
|
|
110
|
+
* the ADR-007 read path (lib/artifact-git-read.ts), which reuses the same
|
|
111
|
+
* clone/pack infrastructure for bulk artifact reads.
|
|
112
|
+
*/
|
|
113
|
+
export declare function withDeployKeyGit<T>(privateKeyPem: string, runGit: GitCommandRunner, tempPrefix: string, callback: (context: DeployKeyGitContext) => Promise<T>): Promise<T>;
|
|
114
|
+
/**
|
|
115
|
+
* Merge a reviewed session/revert branch head into the default branch using the
|
|
116
|
+
* server-only merge deploy key. The source branch is fetched only so GitHub can
|
|
117
|
+
* prove the reviewed SHA is still the branch tip; the merge itself targets the
|
|
118
|
+
* expected SHA, preserving the manifest CAS guarantee.
|
|
119
|
+
*/
|
|
120
|
+
export declare function mergeBranchWithDeployKey(repoFullName: string, input: MergeBranchWithDeployKeyInput, deps?: MergeBranchWithDeployKeyDeps): Promise<DeployKeyMergeResult>;
|
|
121
|
+
//# sourceMappingURL=deploy-key-merge-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy-key-merge-core.d.ts","sourceRoot":"","sources":["../src/deploy-key-merge-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAOH,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,YAAY,EAAE,MAAM,CAAA;IACpB,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC7B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,KAC7C,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAE9B,MAAM,WAAW,4BAA4B;IAC3C,MAAM,CAAC,EAAE,gBAAgB,CAAA;IACzB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;CACrC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,CAAA;IACf,GAAG,EAAE,MAAM,GAAG,IAAI,CAAA;IAClB,yEAAyE;IACzE,aAAa,EAAE,OAAO,CAAA;IACtB,gEAAgE;IAChE,QAAQ,EAAE,OAAO,CAAA;IACjB;oEACgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,EAAE,MAAM,CAAA;CACf;AAaD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAgB7E;AA0BD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,CAAC,UAAU,CAS9F;AAID,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC,UAAU,CAAA;CAAE,GAC/C,OAAO,CAAC,gBAAgB,CAAC,CAgB3B;AAED,wBAAgB,SAAS,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAKnE;AAMD;6EAC6E;AAC7E,wBAAgB,WAAW,CAAC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAI7E;AAOD,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAClD,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,gBAAgB,CAAC,CAAA;CACxE;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,EACtC,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,CAAC,OAAO,EAAE,mBAAmB,KAAK,OAAO,CAAC,CAAC,CAAC,GACrD,OAAO,CAAC,CAAC,CAAC,CAwCZ;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,CAC5C,YAAY,EAAE,MAAM,EACpB,KAAK,EAAE,6BAA6B,EACpC,IAAI,GAAE,4BAAiC,GACtC,OAAO,CAAC,oBAAoB,CAAC,CAsE/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface DiffCommentsCliContext {
|
|
2
|
+
getArg: (name: string) => string | null;
|
|
3
|
+
rejectDashPrefixedOptionValue: (name: string, value: string | null) => void;
|
|
4
|
+
authedFetch: (path: string, init?: RequestInit) => Promise<Response>;
|
|
5
|
+
parseJsonResponse: <T>(response: Response, context: string) => Promise<T>;
|
|
6
|
+
hasJsonFlag: () => boolean;
|
|
7
|
+
printJson: (value: Record<string, unknown>) => void;
|
|
8
|
+
printLine: (message?: string) => void;
|
|
9
|
+
sanitizeTerminalText: (value: unknown) => string;
|
|
10
|
+
}
|
|
11
|
+
export declare function diffCommentsCommand(ctx: DiffCommentsCliContext): Promise<void>;
|
|
12
|
+
//# sourceMappingURL=diff-comments-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"diff-comments-cli.d.ts","sourceRoot":"","sources":["../src/diff-comments-cli.ts"],"names":[],"mappings":"AAyFA,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAA;IACvC,6BAA6B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IAC3E,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;IACpE,iBAAiB,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,CAAA;IACzE,WAAW,EAAE,MAAM,OAAO,CAAA;IAC1B,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAA;IACnD,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACrC,oBAAoB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;CACjD;AAwTD,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,sBAAsB,iBAiBpE"}
|
|
@@ -61,6 +61,16 @@ function formatDeltaValue(value, metric, signed = false) {
|
|
|
61
61
|
return '—';
|
|
62
62
|
return metric === 'tokens' ? `~${formatted}` : formatted;
|
|
63
63
|
}
|
|
64
|
+
function isLengthMetricDelta(value) {
|
|
65
|
+
if (typeof value !== 'object' || value === null || Array.isArray(value)) {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
const delta = value;
|
|
69
|
+
const isNullableFiniteNumber = (candidate) => candidate === null || (typeof candidate === 'number' && Number.isFinite(candidate));
|
|
70
|
+
return isNullableFiniteNumber(delta.removed) &&
|
|
71
|
+
isNullableFiniteNumber(delta.added) &&
|
|
72
|
+
isNullableFiniteNumber(delta.net);
|
|
73
|
+
}
|
|
64
74
|
function printLengthMeasurements(ctx, pair) {
|
|
65
75
|
function unavailableSuffix(reason) {
|
|
66
76
|
if (typeof reason !== 'string' || reason.length === 0)
|
|
@@ -83,8 +93,10 @@ function printLengthMeasurements(ctx, pair) {
|
|
|
83
93
|
ctx.printLine(` Length delta: unavailable${unavailableSuffix(pair.lengthDeltaUnavailableReason ?? pair.degraded?.reason)}`);
|
|
84
94
|
return;
|
|
85
95
|
}
|
|
86
|
-
|
|
87
|
-
|
|
96
|
+
const splitUnavailableReason = pair.lengthDelta.splitUnavailableReason;
|
|
97
|
+
if (typeof splitUnavailableReason === 'string' &&
|
|
98
|
+
splitUnavailableReason.length > 0) {
|
|
99
|
+
ctx.printLine(` Split unavailable: ${sanitizeHumanInlineText(ctx.sanitizeTerminalText, splitUnavailableReason)}`);
|
|
88
100
|
}
|
|
89
101
|
for (const [metric, label] of [
|
|
90
102
|
['tokens', 'Tokens'],
|
|
@@ -93,6 +105,10 @@ function printLengthMeasurements(ctx, pair) {
|
|
|
93
105
|
['words', 'Words'],
|
|
94
106
|
]) {
|
|
95
107
|
const delta = pair.lengthDelta[metric];
|
|
108
|
+
if (!isLengthMetricDelta(delta)) {
|
|
109
|
+
ctx.printLine(` ${label}: unavailable`);
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
96
112
|
ctx.printLine(` ${label}: removed ${formatDeltaValue(delta.removed, metric)} · ` +
|
|
97
113
|
`added ${formatDeltaValue(delta.added, metric)} · ` +
|
|
98
114
|
`net ${formatDeltaValue(delta.net, metric, true)}`);
|
|
@@ -182,6 +198,9 @@ function printDiffComments(ctx, payload) {
|
|
|
182
198
|
`${sanitizeHumanInlineText(ctx.sanitizeTerminalText, comment.anchor.side)} line ` +
|
|
183
199
|
`${sanitizeHumanInlineText(ctx.sanitizeTerminalText, String(comment.anchor.line + 1))}`);
|
|
184
200
|
printHumanTextBlock(ctx, comment.body);
|
|
201
|
+
if (typeof comment.componentKey === 'string' && comment.componentKey) {
|
|
202
|
+
ctx.printLine(` Component: ${sanitizeHumanInlineText(ctx.sanitizeTerminalText, comment.componentKey)}`);
|
|
203
|
+
}
|
|
185
204
|
if (comment.contextUnavailableReason) {
|
|
186
205
|
ctx.printLine(` Context unavailable: ${sanitizeHumanInlineText(ctx.sanitizeTerminalText, comment.contextUnavailableReason)}`);
|
|
187
206
|
if (comment.context) {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-team ADDITIVE egress allowlist CLI (ALI-1006 / G5):
|
|
3
|
+
* orizu team egress-allowlist <team> # show extra domains
|
|
4
|
+
* orizu team egress-allowlist <team> --add <domain>
|
|
5
|
+
* orizu team egress-allowlist <team> --remove <domain>
|
|
6
|
+
* orizu team egress-allowlist <team> --set a.com,b.com
|
|
7
|
+
* orizu team egress-allowlist <team> --clear
|
|
8
|
+
*
|
|
9
|
+
* The BASE allowlist (Orizu API + model provider + git host) is code-owned and
|
|
10
|
+
* NOT shown/managed here — this surface only widens a team's egress with domains
|
|
11
|
+
* a customer workflow needs. Human ADMIN only: the server rejects agent bearers
|
|
12
|
+
* and non-admins (the definer RPC gates on is_team_admin). Pure command logic
|
|
13
|
+
* with an injected fetcher.
|
|
14
|
+
*/
|
|
15
|
+
export type CliFetcher = (path: string, init?: RequestInit) => Promise<Response>;
|
|
16
|
+
export interface EgressAllowlistCommandIo {
|
|
17
|
+
json: boolean;
|
|
18
|
+
print: (line: string) => void;
|
|
19
|
+
printErr?: (line: string) => void;
|
|
20
|
+
fetcher?: CliFetcher;
|
|
21
|
+
}
|
|
22
|
+
export declare function egressAllowlistCommand(args: string[], io: EgressAllowlistCommandIo): Promise<number>;
|
|
23
|
+
//# sourceMappingURL=egress-allowlist-cli.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"egress-allowlist-cli.d.ts","sourceRoot":"","sources":["../src/egress-allowlist-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAWH,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEhF,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,UAAU,CAAA;CACrB;AAiID,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,CA4D1G"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* G5 — sandbox egress policy builder (ALI-1006, per the hosted-agent threat
|
|
3
|
+
* model T1). Owns the ALLOWLIST CONTENT the `SandboxProvider` seam plumbs to the
|
|
4
|
+
* sandbox firewall at create (`packages/cli/src/vercel-sandbox-provider.ts` →
|
|
5
|
+
* Vercel `networkPolicy`). The Vercel adapter is a pass-through; this file is
|
|
6
|
+
* where "default-deny with a per-team allowlist (Orizu API, model providers, git
|
|
7
|
+
* host); blocked attempts logged" is actually decided.
|
|
8
|
+
*
|
|
9
|
+
* The policy is DEFAULT-DENY: the record form `{ allow: { host: rules } }` denies
|
|
10
|
+
* everything NOT explicitly listed, so the correctness invariant is simply that
|
|
11
|
+
* we NEVER emit a `"*"` allow entry (which would re-open the sandbox). The
|
|
12
|
+
* model-key credential broker (G3 / `buildModelKeyBrokerPolicy`) is COMPOSED onto
|
|
13
|
+
* the model host's rule here so brokering + allowlisting are ONE coherent policy,
|
|
14
|
+
* not two policies that could disagree.
|
|
15
|
+
*
|
|
16
|
+
* SNI matching (verified against @vercel/sandbox@1.10.2 `NetworkPolicy`): an
|
|
17
|
+
* allow entry matches the exact SNI host; a LEADING-wildcard entry (`*.orizu.ai`)
|
|
18
|
+
* matches any single-or-multi-label subdomain but NOT the apex — so a host that
|
|
19
|
+
* must serve BOTH apex and subdomains is listed twice (`orizu.ai` +
|
|
20
|
+
* `*.orizu.ai`). Domains are hostnames only — never a protocol, path, or port.
|
|
21
|
+
*
|
|
22
|
+
* The BASE allowlist (Orizu API + model provider + git host) is CODE-OWNED and
|
|
23
|
+
* non-negotiable: `buildEgressPolicy` always includes it and per-team config can
|
|
24
|
+
* only ADD to it, never remove a base host. See
|
|
25
|
+
* docs/requirements/hosted-customer-workbench/sandbox-egress-policy.md for the
|
|
26
|
+
* rationale per host and the honest statement of what Vercel enforces (firewall,
|
|
27
|
+
* SNI-level) vs. what we generate (blocked-attempt evidence via the canary).
|
|
28
|
+
*/
|
|
29
|
+
import type { SandboxEgressPolicy } from './sandbox-provider.js';
|
|
30
|
+
/** Default model-provider endpoint (Anthropic) the broker injects a key for. */
|
|
31
|
+
export declare const ANTHROPIC_API_HOST = "api.anthropic.com";
|
|
32
|
+
/** Anthropic authenticates with `x-api-key` (not a Bearer Authorization). */
|
|
33
|
+
export declare const ANTHROPIC_API_KEY_HEADER = "x-api-key";
|
|
34
|
+
/** GitHub git-over-HTTPS SNIs. `git clone`/`git push` over the smart HTTP
|
|
35
|
+
* protocol connect to `github.com`; `codeload.github.com` serves repository
|
|
36
|
+
* archive/tarball fetches (release assets, `pip`/`go` github-archive installs).
|
|
37
|
+
* Both are allowed so the agent's git work AND any archive fetch its workflow
|
|
38
|
+
* triggers succeed — everything else on github's infra stays denied. */
|
|
39
|
+
export declare const GIT_HOST_DOMAINS: readonly ["github.com", "codeload.github.com"];
|
|
40
|
+
/** Default host the startup canary probes to PROVE the policy is live (a known
|
|
41
|
+
* non-allowlisted host: reaching it means egress is NOT enforced). */
|
|
42
|
+
export declare const DEFAULT_EGRESS_CANARY_HOST = "example.com";
|
|
43
|
+
/**
|
|
44
|
+
* Resolve the Orizu control-plane host from a base URL and CONSERVATIVELY
|
|
45
|
+
* wildcard its registrable base domain so the policy survives the API moving to
|
|
46
|
+
* a subdomain (e.g. `api.orizu.ai`) without re-opening egress. Returns the apex
|
|
47
|
+
* PLUS a leading-wildcard for its subdomains: `orizu.ai` + `*.orizu.ai`. A
|
|
48
|
+
* loopback/localhost base (rehearsal) yields just the bare host (no wildcard —
|
|
49
|
+
* there is nothing to broaden and the firewall does not enforce it anyway).
|
|
50
|
+
*/
|
|
51
|
+
export declare function orizuEgressDomains(baseUrl: string | undefined): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Normalize a per-team extra domain to a bare hostname (or leading-wildcard).
|
|
54
|
+
* Strips protocol/path/port, lowercases, and validates the SNI shape. Returns
|
|
55
|
+
* null for anything that is not a plausible hostname so a bad config entry is
|
|
56
|
+
* dropped rather than silently widening the policy in an unexpected way.
|
|
57
|
+
*/
|
|
58
|
+
export declare function normalizeEgressDomain(input: string): string | null;
|
|
59
|
+
export interface EgressModelKeyBroker {
|
|
60
|
+
/** The raw model API key. It lives ONLY in the policy the host sends to the
|
|
61
|
+
* firewall control plane; it never enters the sandbox env/disk/run events. */
|
|
62
|
+
apiKey: string;
|
|
63
|
+
/** Domain to inject the key for (default api.anthropic.com). */
|
|
64
|
+
host?: string;
|
|
65
|
+
/** Header the endpoint authenticates with (default x-api-key). */
|
|
66
|
+
headerName?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface BuildEgressPolicyOptions {
|
|
69
|
+
/** Orizu control-plane base URL (default env ORIZU_BASE_URL / orizu.ai). */
|
|
70
|
+
orizuBaseUrl?: string;
|
|
71
|
+
/** Additional model-provider hosts to allow WITHOUT a key transform. The broker
|
|
72
|
+
* host (below) is added automatically; list only extra providers here. */
|
|
73
|
+
modelHosts?: readonly string[];
|
|
74
|
+
/** Compose the G3 model-key broker transform onto its host's allow rule, so
|
|
75
|
+
* brokering and the allowlist are one policy. */
|
|
76
|
+
modelKeyBroker?: EgressModelKeyBroker;
|
|
77
|
+
/** Per-team ADDITIVE domains (a customer's own API a workflow needs). Base
|
|
78
|
+
* hosts can never be removed; these only widen. Invalid entries are dropped. */
|
|
79
|
+
extraDomains?: readonly string[];
|
|
80
|
+
/** Exact server-derived Git remote hosts needed in addition to the legacy
|
|
81
|
+
* GitHub migration hosts. Artifacts account hosts are passed here only after
|
|
82
|
+
* strict remote validation; never use a broad wildcard. */
|
|
83
|
+
repositoryHosts?: readonly string[];
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Compute the ordered list of BASE (code-owned, non-removable) allow domains for
|
|
87
|
+
* an Orizu base URL: the Orizu control-plane host(s), the model provider host,
|
|
88
|
+
* and the git host(s). Exported so tests and the policy doc assert the exact set.
|
|
89
|
+
*/
|
|
90
|
+
export declare function baseEgressDomains(opts?: {
|
|
91
|
+
orizuBaseUrl?: string;
|
|
92
|
+
modelHost?: string;
|
|
93
|
+
modelHosts?: readonly string[];
|
|
94
|
+
repositoryHosts?: readonly string[];
|
|
95
|
+
}): string[];
|
|
96
|
+
/**
|
|
97
|
+
* Build a DEFAULT-DENY Vercel network policy whose allowlist is exactly the base
|
|
98
|
+
* hosts (Orizu API + model provider + git) plus any valid per-team extra domains,
|
|
99
|
+
* with the model-key broker transform COMPOSED onto the model host's rule.
|
|
100
|
+
*
|
|
101
|
+
* Correctness invariants (unit-tested):
|
|
102
|
+
* - record form → default-deny (no `"*"` key is EVER emitted);
|
|
103
|
+
* - every base host is present;
|
|
104
|
+
* - the broker transform sits on the model host's rule (one coherent policy);
|
|
105
|
+
* - base hosts survive regardless of `extraDomains` (cannot be removed).
|
|
106
|
+
*/
|
|
107
|
+
export declare function buildEgressPolicy(opts?: BuildEgressPolicyOptions): SandboxEgressPolicy;
|
|
108
|
+
//# sourceMappingURL=egress-policy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"egress-policy.d.ts","sourceRoot":"","sources":["../src/egress-policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAqB,MAAM,uBAAuB,CAAA;AAEnF,gFAAgF;AAChF,eAAO,MAAM,kBAAkB,sBAAsB,CAAA;AACrD,6EAA6E;AAC7E,eAAO,MAAM,wBAAwB,cAAc,CAAA;AAEnD;;;;yEAIyE;AACzE,eAAO,MAAM,gBAAgB,gDAAiD,CAAA;AAE9E;uEACuE;AACvE,eAAO,MAAM,0BAA0B,gBAAgB,CAAA;AAKvD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,EAAE,CAwBxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAelE;AAED,MAAM,WAAW,oBAAoB;IACnC;mFAC+E;IAC/E,MAAM,EAAE,MAAM,CAAA;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,wBAAwB;IACvC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;+EAC2E;IAC3E,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B;sDACkD;IAClD,cAAc,CAAC,EAAE,oBAAoB,CAAA;IACrC;qFACiF;IACjF,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC;;+DAE2D;IAC3D,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACpC;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE;IACtC,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAC9B,eAAe,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC/B,GAAG,MAAM,EAAE,CAuBhB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,GAAE,wBAA6B,GAAG,mBAAmB,CA6B1F"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface ErrorResponsePayload {
|
|
2
|
+
error?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function isJsonErrorResponsePayload(response: Response, payload: unknown): payload is ErrorResponsePayload & {
|
|
5
|
+
error: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function extractErrorMessage(response: Response): Promise<string>;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=error-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-response.d.ts","sourceRoot":"","sources":["../src/error-response.ts"],"names":[],"mappings":"AAEA,UAAU,oBAAoB;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAID,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,GACf,OAAO,IAAI,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CASrD;AAMD,wBAAsB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAa7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-parser.d.ts","sourceRoot":"","sources":["../src/file-parser.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG;IAClD,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAA;IACpC,UAAU,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAA;CACrC,CA6DA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type GepaEngine = 'official' | 'legacy';
|
|
2
|
+
export interface GepaEngineDispatch {
|
|
3
|
+
engine: GepaEngine;
|
|
4
|
+
args: string[];
|
|
5
|
+
environment: NodeJS.ProcessEnv;
|
|
6
|
+
module: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function dispatchGepaEngine(args: string[], project: string, environment: NodeJS.ProcessEnv): GepaEngineDispatch;
|
|
9
|
+
//# sourceMappingURL=gepa-engine-dispatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gepa-engine-dispatch.d.ts","sourceRoot":"","sources":["../src/gepa-engine-dispatch.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAA;AAE9C,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,UAAU,CAAA;IAClB,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,WAAW,EAAE,MAAM,CAAC,UAAU,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAA;CACf;AAuTD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,UAAU,GAAG,kBAAkB,CAmBtH"}
|